github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/transaction/isolation_1.result (about)

     1  drop table if exists test_11;
     2  create table test_11 (c int primary key,d int);
     3  Insert into test_11 values(1,1);
     4  Insert into test_11 values(2,2);
     5  begin;
     6  Insert into test_11 values(3,1);
     7  Insert into test_11 values(4,2);
     8  select * from test_11;
     9  c    d
    10  3    1
    11  4    2
    12  1    1
    13  2    2
    14  use isolation_1;
    15  begin;
    16  select * from test_11;
    17  c    d
    18  1    1
    19  2    2
    20  commit;
    21  select * from test_11;
    22  c    d
    23  1    1
    24  2    2
    25  3    1
    26  4    2
    27  commit;
    28  select * from test_11;
    29  c    d
    30  1    1
    31  2    2
    32  3    1
    33  4    2
    34  drop table if exists test_11;
    35  create table test_11 (c int primary key,d int);
    36  Insert into test_11 values(1,1);
    37  Insert into test_11 values(2,2);
    38  begin;
    39  Insert into test_11 values(3,1);
    40  Insert into test_11 values(4,2);
    41  select * from test_11;
    42  c    d
    43  3    1
    44  4    2
    45  1    1
    46  2    2
    47  begin;
    48  select * from test_11;
    49  c    d
    50  1    1
    51  2    2
    52  delete from test_11 where c =1;
    53  select * from test_11;
    54  c    d
    55  3    1
    56  4    2
    57  2    2
    58  select * from test_11;
    59  c    d
    60  1    1
    61  2    2
    62  update test_11 set d = c +1 where c > 2;
    63  select * from test_11;
    64  c    d
    65  3    4
    66  4    5
    67  2    2
    68  select * from test_11;
    69  c    d
    70  1    1
    71  2    2
    72  commit;
    73  select * from test_11;
    74  c    d
    75  2    2
    76  3    4
    77  4    5
    78  commit;
    79  select * from test_11;
    80  c    d
    81  2    2
    82  3    4
    83  4    5
    84  drop table if exists test_11;
    85  begin;
    86  create table test_11 (c int primary key,d int);
    87  Insert into test_11 values(1,1);
    88  Insert into test_11 values(2,2);
    89  select * from test_11;
    90  c    d
    91  1    1
    92  2    2
    93  begin;
    94  select * from test_11;
    95  SQL parser error: table "test_11" does not exist
    96  Previous DML conflicts with existing constraints or data format. This transaction has to be aborted
    97  commit;
    98  select * from test_11;
    99  c    d
   100  1    1
   101  2    2
   102  commit;
   103  select * from test_11;
   104  c    d
   105  1    1
   106  2    2
   107  drop table if exists test_11;
   108  create table test_11 (c int primary key,d int);
   109  Insert into test_11 values(1,1);
   110  Insert into test_11 values(2,2);
   111  begin;
   112  Insert into test_11 values(3,1);
   113  Insert into test_11 values(4,2);
   114  select * from test_11;
   115  c    d
   116  3    1
   117  4    2
   118  1    1
   119  2    2
   120  begin;
   121  select * from test_11;
   122  c    d
   123  1    1
   124  2    2
   125  Insert into test_11 values(5,4);
   126  select * from test_11;
   127  c    d
   128  5    4
   129  1    1
   130  2    2
   131  select * from test_11;
   132  c    d
   133  3    1
   134  4    2
   135  1    1
   136  2    2
   137  Insert into test_11 values(50,50);
   138  Insert into test_11 values(51,50);
   139  select * from test_11;
   140  c    d
   141  5    4
   142  51    50
   143  1    1
   144  2    2
   145  select * from test_11;
   146  c    d
   147  3    1
   148  4    2
   149  50    50
   150  1    1
   151  2    2
   152  commit;
   153  commit;
   154  select * from test_11;
   155  c    d
   156  1    1
   157  2    2
   158  3    1
   159  4    2
   160  50    50
   161  5    4
   162  51    50
   163  select * from test_11;
   164  c    d
   165  1    1
   166  2    2
   167  3    1
   168  4    2
   169  50    50
   170  5    4
   171  51    50
   172  drop table if exists test_11;
   173  create table test_11 (c int primary key,d int);
   174  Insert into test_11 values(1,1);
   175  Insert into test_11 values(2,2);
   176  begin;
   177  Insert into test_11 values(3,1);
   178  Insert into test_11 values(4,2);
   179  select * from test_11;
   180  c    d
   181  3    1
   182  4    2
   183  1    1
   184  2    2
   185  begin;
   186  select * from test_11;
   187  c    d
   188  1    1
   189  2    2
   190  Insert into test_11 values(5,4);
   191  select * from test_11;
   192  c    d
   193  5    4
   194  1    1
   195  2    2
   196  select * from test_11;
   197  c    d
   198  3    1
   199  4    2
   200  1    1
   201  2    2
   202  Insert into test_11 values(50,50);
   203  Insert into test_11 values(50,50);
   204  select * from test_11;
   205  c    d
   206  5    4
   207  50    50
   208  1    1
   209  2    2
   210  select * from test_11;
   211  c    d
   212  3    1
   213  4    2
   214  50    50
   215  1    1
   216  2    2
   217  commit;
   218  commit;
   219  w-w conflict
   220  select * from test_11;
   221  c    d
   222  1    1
   223  2    2
   224  3    1
   225  4    2
   226  50    50
   227  select * from test_11;
   228  c    d
   229  1    1
   230  2    2
   231  3    1
   232  4    2
   233  50    50
   234  drop table if exists test_11;
   235  create table test_11 (c int primary key,d int);
   236  Insert into test_11 values(1,1);
   237  Insert into test_11 values(2,2);
   238  begin;
   239  select * from test_11;
   240  c    d
   241  1    1
   242  2    2
   243  Insert into test_11 values(50,50);
   244  select * from test_11;
   245  c    d
   246  50    50
   247  1    1
   248  2    2
   249  begin;
   250  select * from test_11;
   251  c    d
   252  1    1
   253  2    2
   254  Insert into test_11 values(50,50);
   255  select * from test_11;
   256  c    d
   257  50    50
   258  1    1
   259  2    2
   260  select * from test_11;
   261  c    d
   262  50    50
   263  1    1
   264  2    2
   265  delete from test_11 where c = 50;
   266  select * from test_11;
   267  c    d
   268  1    1
   269  2    2
   270  select * from test_11;
   271  c    d
   272  50    50
   273  1    1
   274  2    2
   275  commit;
   276  commit;
   277  select * from test_11;
   278  c    d
   279  1    1
   280  2    2
   281  50    50
   282  select * from test_11;
   283  c    d
   284  1    1
   285  2    2
   286  50    50
   287  drop table if exists test_11;
   288  create table test_11 (c int primary key,d int);
   289  Insert into test_11 values(1,1);
   290  Insert into test_11 values(2,2);
   291  begin;
   292  select * from test_11;
   293  c    d
   294  1    1
   295  2    2
   296  Insert into test_11 values(50,50);
   297  select * from test_11;
   298  c    d
   299  50    50
   300  1    1
   301  2    2
   302  begin;
   303  select * from test_11;
   304  c    d
   305  1    1
   306  2    2
   307  Insert into test_11 values(50,50);
   308  select * from test_11;
   309  c    d
   310  50    50
   311  1    1
   312  2    2
   313  select * from test_11;
   314  c    d
   315  50    50
   316  1    1
   317  2    2
   318  select * from test_11;
   319  c    d
   320  50    50
   321  1    1
   322  2    2
   323  update test_11 set c = 100 where d = 50;
   324  select * from test_11;
   325  c    d
   326  100    50
   327  1    1
   328  2    2
   329  select * from test_11;
   330  c    d
   331  50    50
   332  1    1
   333  2    2
   334  Insert into test_11 values(100,50);
   335  commit;
   336  commit;
   337  w-w conflict
   338  select * from test_11;
   339  c    d
   340  1    1
   341  2    2
   342  50    50
   343  100    50
   344  select * from test_11;
   345  c    d
   346  1    1
   347  2    2
   348  50    50
   349  100    50
   350  drop table if exists test_11;
   351  create table test_11 (c int primary key,d int);
   352  Insert into test_11 values(1,1);
   353  Insert into test_11 values(2,2);
   354  begin;
   355  select * from test_11;
   356  c    d
   357  1    1
   358  2    2
   359  Insert into test_11 values(50,50);
   360  select * from test_11;
   361  c    d
   362  50    50
   363  1    1
   364  2    2
   365  begin;
   366  select * from test_11;
   367  c    d
   368  1    1
   369  2    2
   370  Insert into test_11 values(50,50);
   371  select * from test_11;
   372  c    d
   373  50    50
   374  1    1
   375  2    2
   376  select * from test_11;
   377  c    d
   378  50    50
   379  1    1
   380  2    2
   381  select * from test_11;
   382  c    d
   383  50    50
   384  1    1
   385  2    2
   386  update test_11 set c = 100 where d = 50;
   387  select * from test_11;
   388  c    d
   389  100    50
   390  1    1
   391  2    2
   392  select * from test_11;
   393  c    d
   394  50    50
   395  1    1
   396  2    2
   397  update test_11 set c = 101 where c = 50;
   398  commit;
   399  commit;
   400  select * from test_11;
   401  c    d
   402  1    1
   403  2    2
   404  101    50
   405  100    50
   406  select * from test_11;
   407  c    d
   408  1    1
   409  2    2
   410  101    50
   411  100    50
   412  drop table if exists test_11;
   413  create table test_11 (c int primary key,d int);
   414  Insert into test_11 values(1,1);
   415  Insert into test_11 values(2,2);
   416  begin;
   417  select * from test_11;
   418  c    d
   419  1    1
   420  2    2
   421  Insert into test_11 values(50,50);
   422  select * from test_11;
   423  c    d
   424  50    50
   425  1    1
   426  2    2
   427  begin;
   428  select * from test_11;
   429  c    d
   430  1    1
   431  2    2
   432  Insert into test_11 values(50,50);
   433  select * from test_11;
   434  c    d
   435  50    50
   436  1    1
   437  2    2
   438  select * from test_11;
   439  c    d
   440  50    50
   441  1    1
   442  2    2
   443  select * from test_11;
   444  c    d
   445  50    50
   446  1    1
   447  2    2
   448  update test_11 set c = 100 where d = 50;
   449  select * from test_11;
   450  c    d
   451  100    50
   452  1    1
   453  2    2
   454  select * from test_11;
   455  c    d
   456  50    50
   457  1    1
   458  2    2
   459  update test_11 set c = 100 where d = 50;
   460  commit;
   461  commit;
   462  w-w conflict
   463  select * from test_11;
   464  c    d
   465  1    1
   466  2    2
   467  100    50
   468  select * from test_11;
   469  c    d
   470  1    1
   471  2    2
   472  100    50
   473  drop table if exists test_11;
   474  begin;
   475  create table test_11 (c int primary key,d int);
   476  Insert into test_11 values(1,1);
   477  Insert into test_11 values(2,2);
   478  select * from test_11;
   479  c    d
   480  1    1
   481  2    2
   482  begin;
   483  select * from test_11;
   484  SQL parser error: table "test_11" does not exist
   485  Previous DML conflicts with existing constraints or data format. This transaction has to be aborted
   486  commit;
   487  select * from test_11;
   488  c    d
   489  1    1
   490  2    2
   491  commit;
   492  select * from test_11;
   493  c    d
   494  1    1
   495  2    2
   496  drop table if exists test_11;
   497  create table test_11 (c int primary key,d int);
   498  Insert into test_11 values(1,1);
   499  Insert into test_11 values(2,2);
   500  select * from test_11;
   501  c    d
   502  1    1
   503  2    2
   504  begin;
   505  select * from test_11;
   506  c    d
   507  1    1
   508  2    2
   509  begin;
   510  drop table test_11;
   511  internal error: Only CREATE of DDL is supported in transactions
   512  select * from test_11;
   513  c    d
   514  1    1
   515  2    2
   516  select * from test_11;
   517  c    d
   518  1    1
   519  2    2
   520  commit;
   521  select * from test_11;
   522  c    d
   523  1    1
   524  2    2
   525  commit;
   526  select * from test_11;
   527  c    d
   528  1    1
   529  2    2
   530  drop table if exists test_11;
   531  begin;
   532  create table test_11 (c int primary key,d int);
   533  Insert into test_11 values(1,1);
   534  Insert into test_11 values(2,2);
   535  select * from test_11;
   536  c    d
   537  1    1
   538  2    2
   539  begin;
   540  select * from test_11;
   541  SQL parser error: table "test_11" does not exist
   542  Previous DML conflicts with existing constraints or data format. This transaction has to be aborted
   543  select * from test_11;
   544  c    d
   545  1    1
   546  2    2
   547  select * from test_11;
   548  SQL parser error: table "test_11" does not exist
   549  commit;
   550  select * from test_11;
   551  c    d
   552  1    1
   553  2    2
   554  commit;
   555  select * from test_11;
   556  c    d
   557  1    1
   558  2    2
   559  drop table if exists test_11;