github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/save_query_result/save_query_result.result (about)

     1  drop table if exists test_table;
     2  create table test_table(
     3  col1 int,
     4  col2 float,
     5  col3 bool,
     6  col4 Date,
     7  col5 varchar(255),
     8  col6 text
     9  );
    10  set global save_query_result = on;
    11  show create table test_table;
    12  Table    Create Table
    13  test_table    CREATE TABLE `test_table` (\n`col1` INT DEFAULT NULL,\n`col2` FLOAT DEFAULT NULL,\n`col3` BOOL DEFAULT NULL,\n`col4` DATE DEFAULT NULL,\n`col5` VARCHAR(255) DEFAULT NULL,\n`col6` TEXT DEFAULT NULL\n)
    14  select * from result_scan(last_query_id()) as u;
    15  Table    Create Table
    16  test_table    CREATE TABLE `test_table` (\n`col1` INT DEFAULT NULL,\n`col2` FLOAT DEFAULT NULL,\n`col3` BOOL DEFAULT NULL,\n`col4` DATE DEFAULT NULL,\n`col5` VARCHAR(255) DEFAULT NULL,\n`col6` TEXT DEFAULT NULL\n)
    17  show tables;
    18  Tables_in_save_query_result
    19  test_table
    20  select * from result_scan(last_query_id()) as u;
    21  Tables_in_save_query_result
    22  test_table
    23  show databases like "mysql";
    24  Database
    25  mysql
    26  select * from result_scan(last_query_id()) as u;
    27  Database
    28  mysql
    29  load data infile '$resources/load_data/test_1.csv' into table test_table fields terminated by ',';
    30  /* save_result */select * from test_table;
    31  col1    col2    col3    col4    col5    col6
    32  0    0.1    true    1982-03-24    varchar_0    text_0
    33  1    1.1    false    1982-07-31    varchar_1    text_1
    34  2    2.1    true    2002-04-13    varchar_2    text_2
    35  3    3.1    false    2019-09-29    varchar_3    text_3
    36  4    4.1    true    1996-08-20    varchar_4    text_4
    37  5    5.1    false    2008-10-13    varchar_5    text_5
    38  6    6.1    true    2002-03-05    varchar_6    text_6
    39  7    7.1    false    1993-11-07    varchar_7    text_7
    40  8    8.1    true    1994-01-08    varchar_8    text_8
    41  9    9.1    false    1999-09-17    varchar_9    text_9
    42  10    10.1    true    2003-09-28    varchar_10    text_10
    43  11    11.1    false    1984-01-22    varchar_11    text_11
    44  12    12.1    true    1994-02-10    varchar_12    text_12
    45  13    13.1    false    1994-12-02    varchar_13    text_13
    46  14    14.1    true    2013-01-19    varchar_14    text_14
    47  15    15.1    false    2002-09-29    varchar_15    text_15
    48  16    16.1    true    2001-12-07    varchar_16    text_16
    49  17    17.1    false    1989-03-11    varchar_17    text_17
    50  18    18.1    true    2019-11-04    varchar_18    text_18
    51  19    19.1    false    2002-08-15    varchar_19    text_19
    52  20    20.1    true    1995-12-20    varchar_20    text_20
    53  21    21.1    false    2018-08-03    varchar_21    text_21
    54  22    22.1    true    1998-03-10    varchar_22    text_22
    55  23    23.1    false    2022-04-08    varchar_23    text_23
    56  24    24.1    true    1989-04-27    varchar_24    text_24
    57  25    25.1    false    2009-03-14    varchar_25    text_25
    58  26    26.1    true    2019-03-27    varchar_26    text_26
    59  27    27.1    false    1983-10-28    varchar_27    text_27
    60  28    28.1    true    1993-07-19    varchar_28    text_28
    61  29    29.1    false    1986-09-11    varchar_29    text_29
    62  30    30.1    true    1992-08-19    varchar_30    text_30
    63  31    31.1    false    1981-08-07    varchar_31    text_31
    64  32    32.1    true    1984-03-25    varchar_32    text_32
    65  33    33.1    false    2001-09-05    varchar_33    text_33
    66  34    34.1    true    2022-03-17    varchar_34    text_34
    67  35    35.1    false    2008-06-24    varchar_35    text_35
    68  36    36.1    true    1987-11-23    varchar_36    text_36
    69  37    37.1    false    2008-11-10    varchar_37    text_37
    70  38    38.1    true    1986-01-29    varchar_38    text_38
    71  39    39.1    false    1985-02-27    varchar_39    text_39
    72  40    40.1    true    2016-11-28    varchar_40    text_40
    73  41    41.1    false    1991-02-11    varchar_41    text_41
    74  42    42.1    true    2019-01-08    varchar_42    text_42
    75  43    43.1    false    2009-05-01    varchar_43    text_43
    76  44    44.1    true    1986-11-15    varchar_44    text_44
    77  45    45.1    false    2000-07-22    varchar_45    text_45
    78  46    46.1    true    2002-09-07    varchar_46    text_46
    79  47    47.1    false    1987-09-23    varchar_47    text_47
    80  48    48.1    true    1985-10-25    varchar_48    text_48
    81  49    49.1    false    1988-10-06    varchar_49    text_49
    82  select * from result_scan(last_query_id()) as u;
    83  col1    col2    col3    col4    col5    col6
    84  0    0.1    true    1982-03-24    varchar_0    text_0
    85  1    1.1    false    1982-07-31    varchar_1    text_1
    86  2    2.1    true    2002-04-13    varchar_2    text_2
    87  3    3.1    false    2019-09-29    varchar_3    text_3
    88  4    4.1    true    1996-08-20    varchar_4    text_4
    89  5    5.1    false    2008-10-13    varchar_5    text_5
    90  6    6.1    true    2002-03-05    varchar_6    text_6
    91  7    7.1    false    1993-11-07    varchar_7    text_7
    92  8    8.1    true    1994-01-08    varchar_8    text_8
    93  9    9.1    false    1999-09-17    varchar_9    text_9
    94  10    10.1    true    2003-09-28    varchar_10    text_10
    95  11    11.1    false    1984-01-22    varchar_11    text_11
    96  12    12.1    true    1994-02-10    varchar_12    text_12
    97  13    13.1    false    1994-12-02    varchar_13    text_13
    98  14    14.1    true    2013-01-19    varchar_14    text_14
    99  15    15.1    false    2002-09-29    varchar_15    text_15
   100  16    16.1    true    2001-12-07    varchar_16    text_16
   101  17    17.1    false    1989-03-11    varchar_17    text_17
   102  18    18.1    true    2019-11-04    varchar_18    text_18
   103  19    19.1    false    2002-08-15    varchar_19    text_19
   104  20    20.1    true    1995-12-20    varchar_20    text_20
   105  21    21.1    false    2018-08-03    varchar_21    text_21
   106  22    22.1    true    1998-03-10    varchar_22    text_22
   107  23    23.1    false    2022-04-08    varchar_23    text_23
   108  24    24.1    true    1989-04-27    varchar_24    text_24
   109  25    25.1    false    2009-03-14    varchar_25    text_25
   110  26    26.1    true    2019-03-27    varchar_26    text_26
   111  27    27.1    false    1983-10-28    varchar_27    text_27
   112  28    28.1    true    1993-07-19    varchar_28    text_28
   113  29    29.1    false    1986-09-11    varchar_29    text_29
   114  30    30.1    true    1992-08-19    varchar_30    text_30
   115  31    31.1    false    1981-08-07    varchar_31    text_31
   116  32    32.1    true    1984-03-25    varchar_32    text_32
   117  33    33.1    false    2001-09-05    varchar_33    text_33
   118  34    34.1    true    2022-03-17    varchar_34    text_34
   119  35    35.1    false    2008-06-24    varchar_35    text_35
   120  36    36.1    true    1987-11-23    varchar_36    text_36
   121  37    37.1    false    2008-11-10    varchar_37    text_37
   122  38    38.1    true    1986-01-29    varchar_38    text_38
   123  39    39.1    false    1985-02-27    varchar_39    text_39
   124  40    40.1    true    2016-11-28    varchar_40    text_40
   125  41    41.1    false    1991-02-11    varchar_41    text_41
   126  42    42.1    true    2019-01-08    varchar_42    text_42
   127  43    43.1    false    2009-05-01    varchar_43    text_43
   128  44    44.1    true    1986-11-15    varchar_44    text_44
   129  45    45.1    false    2000-07-22    varchar_45    text_45
   130  46    46.1    true    2002-09-07    varchar_46    text_46
   131  47    47.1    false    1987-09-23    varchar_47    text_47
   132  48    48.1    true    1985-10-25    varchar_48    text_48
   133  49    49.1    false    1988-10-06    varchar_49    text_49
   134  /* save_result */select col1 from test_table;
   135  col1
   136  0
   137  1
   138  2
   139  3
   140  4
   141  5
   142  6
   143  7
   144  8
   145  9
   146  10
   147  11
   148  12
   149  13
   150  14
   151  15
   152  16
   153  17
   154  18
   155  19
   156  20
   157  21
   158  22
   159  23
   160  24
   161  25
   162  26
   163  27
   164  28
   165  29
   166  30
   167  31
   168  32
   169  33
   170  34
   171  35
   172  36
   173  37
   174  38
   175  39
   176  40
   177  41
   178  42
   179  43
   180  44
   181  45
   182  46
   183  47
   184  48
   185  49
   186  select * from result_scan(last_query_id()) as u;
   187  col1
   188  0
   189  1
   190  2
   191  3
   192  4
   193  5
   194  6
   195  7
   196  8
   197  9
   198  10
   199  11
   200  12
   201  13
   202  14
   203  15
   204  16
   205  17
   206  18
   207  19
   208  20
   209  21
   210  22
   211  23
   212  24
   213  25
   214  26
   215  27
   216  28
   217  29
   218  30
   219  31
   220  32
   221  33
   222  34
   223  35
   224  36
   225  37
   226  38
   227  39
   228  40
   229  41
   230  42
   231  43
   232  44
   233  45
   234  46
   235  47
   236  48
   237  49
   238  /* save_result */select * from test_table where col1 > 30;
   239  col1    col2    col3    col4    col5    col6
   240  31    31.1    false    1981-08-07    varchar_31    text_31
   241  32    32.1    true    1984-03-25    varchar_32    text_32
   242  33    33.1    false    2001-09-05    varchar_33    text_33
   243  34    34.1    true    2022-03-17    varchar_34    text_34
   244  35    35.1    false    2008-06-24    varchar_35    text_35
   245  36    36.1    true    1987-11-23    varchar_36    text_36
   246  37    37.1    false    2008-11-10    varchar_37    text_37
   247  38    38.1    true    1986-01-29    varchar_38    text_38
   248  39    39.1    false    1985-02-27    varchar_39    text_39
   249  40    40.1    true    2016-11-28    varchar_40    text_40
   250  41    41.1    false    1991-02-11    varchar_41    text_41
   251  42    42.1    true    2019-01-08    varchar_42    text_42
   252  43    43.1    false    2009-05-01    varchar_43    text_43
   253  44    44.1    true    1986-11-15    varchar_44    text_44
   254  45    45.1    false    2000-07-22    varchar_45    text_45
   255  46    46.1    true    2002-09-07    varchar_46    text_46
   256  47    47.1    false    1987-09-23    varchar_47    text_47
   257  48    48.1    true    1985-10-25    varchar_48    text_48
   258  49    49.1    false    1988-10-06    varchar_49    text_49
   259  select * from result_scan(last_query_id()) as u;
   260  col1    col2    col3    col4    col5    col6
   261  31    31.1    false    1981-08-07    varchar_31    text_31
   262  32    32.1    true    1984-03-25    varchar_32    text_32
   263  33    33.1    false    2001-09-05    varchar_33    text_33
   264  34    34.1    true    2022-03-17    varchar_34    text_34
   265  35    35.1    false    2008-06-24    varchar_35    text_35
   266  36    36.1    true    1987-11-23    varchar_36    text_36
   267  37    37.1    false    2008-11-10    varchar_37    text_37
   268  38    38.1    true    1986-01-29    varchar_38    text_38
   269  39    39.1    false    1985-02-27    varchar_39    text_39
   270  40    40.1    true    2016-11-28    varchar_40    text_40
   271  41    41.1    false    1991-02-11    varchar_41    text_41
   272  42    42.1    true    2019-01-08    varchar_42    text_42
   273  43    43.1    false    2009-05-01    varchar_43    text_43
   274  44    44.1    true    1986-11-15    varchar_44    text_44
   275  45    45.1    false    2000-07-22    varchar_45    text_45
   276  46    46.1    true    2002-09-07    varchar_46    text_46
   277  47    47.1    false    1987-09-23    varchar_47    text_47
   278  48    48.1    true    1985-10-25    varchar_48    text_48
   279  49    49.1    false    1988-10-06    varchar_49    text_49
   280  /* save_result */select * from test_table where col1 < 10;
   281  col1    col2    col3    col4    col5    col6
   282  0    0.1    true    1982-03-24    varchar_0    text_0
   283  1    1.1    false    1982-07-31    varchar_1    text_1
   284  2    2.1    true    2002-04-13    varchar_2    text_2
   285  3    3.1    false    2019-09-29    varchar_3    text_3
   286  4    4.1    true    1996-08-20    varchar_4    text_4
   287  5    5.1    false    2008-10-13    varchar_5    text_5
   288  6    6.1    true    2002-03-05    varchar_6    text_6
   289  7    7.1    false    1993-11-07    varchar_7    text_7
   290  8    8.1    true    1994-01-08    varchar_8    text_8
   291  9    9.1    false    1999-09-17    varchar_9    text_9
   292  select * from result_scan(last_query_id()) as u;
   293  col1    col2    col3    col4    col5    col6
   294  0    0.1    true    1982-03-24    varchar_0    text_0
   295  1    1.1    false    1982-07-31    varchar_1    text_1
   296  2    2.1    true    2002-04-13    varchar_2    text_2
   297  3    3.1    false    2019-09-29    varchar_3    text_3
   298  4    4.1    true    1996-08-20    varchar_4    text_4
   299  5    5.1    false    2008-10-13    varchar_5    text_5
   300  6    6.1    true    2002-03-05    varchar_6    text_6
   301  7    7.1    false    1993-11-07    varchar_7    text_7
   302  8    8.1    true    1994-01-08    varchar_8    text_8
   303  9    9.1    false    1999-09-17    varchar_9    text_9
   304  /* save_result */select * from test_table where col1 = 10;
   305  col1    col2    col3    col4    col5    col6
   306  10    10.1    true    2003-09-28    varchar_10    text_10
   307  select * from result_scan(last_query_id()) as u;
   308  col1    col2    col3    col4    col5    col6
   309  10    10.1    true    2003-09-28    varchar_10    text_10
   310  /* save_result */select * from test_table limit 1;
   311  col1    col2    col3    col4    col5    col6
   312  0    0.1    true    1982-03-24    varchar_0    text_0
   313  select * from result_scan(last_query_id()) as u;
   314  col1    col2    col3    col4    col5    col6
   315  0    0.1    true    1982-03-24    varchar_0    text_0
   316  /* save_result */select * from test_table order by col1 asc;
   317  col1    col2    col3    col4    col5    col6
   318  0    0.1    true    1982-03-24    varchar_0    text_0
   319  1    1.1    false    1982-07-31    varchar_1    text_1
   320  2    2.1    true    2002-04-13    varchar_2    text_2
   321  3    3.1    false    2019-09-29    varchar_3    text_3
   322  4    4.1    true    1996-08-20    varchar_4    text_4
   323  5    5.1    false    2008-10-13    varchar_5    text_5
   324  6    6.1    true    2002-03-05    varchar_6    text_6
   325  7    7.1    false    1993-11-07    varchar_7    text_7
   326  8    8.1    true    1994-01-08    varchar_8    text_8
   327  9    9.1    false    1999-09-17    varchar_9    text_9
   328  10    10.1    true    2003-09-28    varchar_10    text_10
   329  11    11.1    false    1984-01-22    varchar_11    text_11
   330  12    12.1    true    1994-02-10    varchar_12    text_12
   331  13    13.1    false    1994-12-02    varchar_13    text_13
   332  14    14.1    true    2013-01-19    varchar_14    text_14
   333  15    15.1    false    2002-09-29    varchar_15    text_15
   334  16    16.1    true    2001-12-07    varchar_16    text_16
   335  17    17.1    false    1989-03-11    varchar_17    text_17
   336  18    18.1    true    2019-11-04    varchar_18    text_18
   337  19    19.1    false    2002-08-15    varchar_19    text_19
   338  20    20.1    true    1995-12-20    varchar_20    text_20
   339  21    21.1    false    2018-08-03    varchar_21    text_21
   340  22    22.1    true    1998-03-10    varchar_22    text_22
   341  23    23.1    false    2022-04-08    varchar_23    text_23
   342  24    24.1    true    1989-04-27    varchar_24    text_24
   343  25    25.1    false    2009-03-14    varchar_25    text_25
   344  26    26.1    true    2019-03-27    varchar_26    text_26
   345  27    27.1    false    1983-10-28    varchar_27    text_27
   346  28    28.1    true    1993-07-19    varchar_28    text_28
   347  29    29.1    false    1986-09-11    varchar_29    text_29
   348  30    30.1    true    1992-08-19    varchar_30    text_30
   349  31    31.1    false    1981-08-07    varchar_31    text_31
   350  32    32.1    true    1984-03-25    varchar_32    text_32
   351  33    33.1    false    2001-09-05    varchar_33    text_33
   352  34    34.1    true    2022-03-17    varchar_34    text_34
   353  35    35.1    false    2008-06-24    varchar_35    text_35
   354  36    36.1    true    1987-11-23    varchar_36    text_36
   355  37    37.1    false    2008-11-10    varchar_37    text_37
   356  38    38.1    true    1986-01-29    varchar_38    text_38
   357  39    39.1    false    1985-02-27    varchar_39    text_39
   358  40    40.1    true    2016-11-28    varchar_40    text_40
   359  41    41.1    false    1991-02-11    varchar_41    text_41
   360  42    42.1    true    2019-01-08    varchar_42    text_42
   361  43    43.1    false    2009-05-01    varchar_43    text_43
   362  44    44.1    true    1986-11-15    varchar_44    text_44
   363  45    45.1    false    2000-07-22    varchar_45    text_45
   364  46    46.1    true    2002-09-07    varchar_46    text_46
   365  47    47.1    false    1987-09-23    varchar_47    text_47
   366  48    48.1    true    1985-10-25    varchar_48    text_48
   367  49    49.1    false    1988-10-06    varchar_49    text_49
   368  select * from result_scan(last_query_id()) as u;
   369  col1    col2    col3    col4    col5    col6
   370  0    0.1    true    1982-03-24    varchar_0    text_0
   371  1    1.1    false    1982-07-31    varchar_1    text_1
   372  2    2.1    true    2002-04-13    varchar_2    text_2
   373  3    3.1    false    2019-09-29    varchar_3    text_3
   374  4    4.1    true    1996-08-20    varchar_4    text_4
   375  5    5.1    false    2008-10-13    varchar_5    text_5
   376  6    6.1    true    2002-03-05    varchar_6    text_6
   377  7    7.1    false    1993-11-07    varchar_7    text_7
   378  8    8.1    true    1994-01-08    varchar_8    text_8
   379  9    9.1    false    1999-09-17    varchar_9    text_9
   380  10    10.1    true    2003-09-28    varchar_10    text_10
   381  11    11.1    false    1984-01-22    varchar_11    text_11
   382  12    12.1    true    1994-02-10    varchar_12    text_12
   383  13    13.1    false    1994-12-02    varchar_13    text_13
   384  14    14.1    true    2013-01-19    varchar_14    text_14
   385  15    15.1    false    2002-09-29    varchar_15    text_15
   386  16    16.1    true    2001-12-07    varchar_16    text_16
   387  17    17.1    false    1989-03-11    varchar_17    text_17
   388  18    18.1    true    2019-11-04    varchar_18    text_18
   389  19    19.1    false    2002-08-15    varchar_19    text_19
   390  20    20.1    true    1995-12-20    varchar_20    text_20
   391  21    21.1    false    2018-08-03    varchar_21    text_21
   392  22    22.1    true    1998-03-10    varchar_22    text_22
   393  23    23.1    false    2022-04-08    varchar_23    text_23
   394  24    24.1    true    1989-04-27    varchar_24    text_24
   395  25    25.1    false    2009-03-14    varchar_25    text_25
   396  26    26.1    true    2019-03-27    varchar_26    text_26
   397  27    27.1    false    1983-10-28    varchar_27    text_27
   398  28    28.1    true    1993-07-19    varchar_28    text_28
   399  29    29.1    false    1986-09-11    varchar_29    text_29
   400  30    30.1    true    1992-08-19    varchar_30    text_30
   401  31    31.1    false    1981-08-07    varchar_31    text_31
   402  32    32.1    true    1984-03-25    varchar_32    text_32
   403  33    33.1    false    2001-09-05    varchar_33    text_33
   404  34    34.1    true    2022-03-17    varchar_34    text_34
   405  35    35.1    false    2008-06-24    varchar_35    text_35
   406  36    36.1    true    1987-11-23    varchar_36    text_36
   407  37    37.1    false    2008-11-10    varchar_37    text_37
   408  38    38.1    true    1986-01-29    varchar_38    text_38
   409  39    39.1    false    1985-02-27    varchar_39    text_39
   410  40    40.1    true    2016-11-28    varchar_40    text_40
   411  41    41.1    false    1991-02-11    varchar_41    text_41
   412  42    42.1    true    2019-01-08    varchar_42    text_42
   413  43    43.1    false    2009-05-01    varchar_43    text_43
   414  44    44.1    true    1986-11-15    varchar_44    text_44
   415  45    45.1    false    2000-07-22    varchar_45    text_45
   416  46    46.1    true    2002-09-07    varchar_46    text_46
   417  47    47.1    false    1987-09-23    varchar_47    text_47
   418  48    48.1    true    1985-10-25    varchar_48    text_48
   419  49    49.1    false    1988-10-06    varchar_49    text_49
   420  /* save_result */select t1.col1,t2.col1 from test_table t1  left join test_table t2 on t1.col1=t2.col1;
   421  col1    col1
   422  0    0
   423  1    1
   424  2    2
   425  3    3
   426  4    4
   427  5    5
   428  6    6
   429  7    7
   430  8    8
   431  9    9
   432  10    10
   433  11    11
   434  12    12
   435  13    13
   436  14    14
   437  15    15
   438  16    16
   439  17    17
   440  18    18
   441  19    19
   442  20    20
   443  21    21
   444  22    22
   445  23    23
   446  24    24
   447  25    25
   448  26    26
   449  27    27
   450  28    28
   451  29    29
   452  30    30
   453  31    31
   454  32    32
   455  33    33
   456  34    34
   457  35    35
   458  36    36
   459  37    37
   460  38    38
   461  39    39
   462  40    40
   463  41    41
   464  42    42
   465  43    43
   466  44    44
   467  45    45
   468  46    46
   469  47    47
   470  48    48
   471  49    49
   472  select * from result_scan(last_query_id()) as u;
   473  col1_0    col1_1
   474  0    0
   475  1    1
   476  2    2
   477  3    3
   478  4    4
   479  5    5
   480  6    6
   481  7    7
   482  8    8
   483  9    9
   484  10    10
   485  11    11
   486  12    12
   487  13    13
   488  14    14
   489  15    15
   490  16    16
   491  17    17
   492  18    18
   493  19    19
   494  20    20
   495  21    21
   496  22    22
   497  23    23
   498  24    24
   499  25    25
   500  26    26
   501  27    27
   502  28    28
   503  29    29
   504  30    30
   505  31    31
   506  32    32
   507  33    33
   508  34    34
   509  35    35
   510  36    36
   511  37    37
   512  38    38
   513  39    39
   514  40    40
   515  41    41
   516  42    42
   517  43    43
   518  44    44
   519  45    45
   520  46    46
   521  47    47
   522  48    48
   523  49    49
   524  /* save_result */select t1.col1,t2.col1 from test_table t1  right join test_table t2 on t1.col1=t2.col1;
   525  col1    col1
   526  0    0
   527  1    1
   528  2    2
   529  3    3
   530  4    4
   531  5    5
   532  6    6
   533  7    7
   534  8    8
   535  9    9
   536  10    10
   537  11    11
   538  12    12
   539  13    13
   540  14    14
   541  15    15
   542  16    16
   543  17    17
   544  18    18
   545  19    19
   546  20    20
   547  21    21
   548  22    22
   549  23    23
   550  24    24
   551  25    25
   552  26    26
   553  27    27
   554  28    28
   555  29    29
   556  30    30
   557  31    31
   558  32    32
   559  33    33
   560  34    34
   561  35    35
   562  36    36
   563  37    37
   564  38    38
   565  39    39
   566  40    40
   567  41    41
   568  42    42
   569  43    43
   570  44    44
   571  45    45
   572  46    46
   573  47    47
   574  48    48
   575  49    49
   576  select * from result_scan(last_query_id()) as u;
   577  col1_0    col1_1
   578  0    0
   579  1    1
   580  2    2
   581  3    3
   582  4    4
   583  5    5
   584  6    6
   585  7    7
   586  8    8
   587  9    9
   588  10    10
   589  11    11
   590  12    12
   591  13    13
   592  14    14
   593  15    15
   594  16    16
   595  17    17
   596  18    18
   597  19    19
   598  20    20
   599  21    21
   600  22    22
   601  23    23
   602  24    24
   603  25    25
   604  26    26
   605  27    27
   606  28    28
   607  29    29
   608  30    30
   609  31    31
   610  32    32
   611  33    33
   612  34    34
   613  35    35
   614  36    36
   615  37    37
   616  38    38
   617  39    39
   618  40    40
   619  41    41
   620  42    42
   621  43    43
   622  44    44
   623  45    45
   624  46    46
   625  47    47
   626  48    48
   627  49    49
   628  /* save_result */select * from test_table union select * from test_table;
   629  col1    col2    col3    col4    col5    col6
   630  0    0.1    true    1982-03-24    varchar_0    text_0
   631  1    1.1    false    1982-07-31    varchar_1    text_1
   632  2    2.1    true    2002-04-13    varchar_2    text_2
   633  3    3.1    false    2019-09-29    varchar_3    text_3
   634  4    4.1    true    1996-08-20    varchar_4    text_4
   635  5    5.1    false    2008-10-13    varchar_5    text_5
   636  6    6.1    true    2002-03-05    varchar_6    text_6
   637  7    7.1    false    1993-11-07    varchar_7    text_7
   638  8    8.1    true    1994-01-08    varchar_8    text_8
   639  9    9.1    false    1999-09-17    varchar_9    text_9
   640  10    10.1    true    2003-09-28    varchar_10    text_10
   641  11    11.1    false    1984-01-22    varchar_11    text_11
   642  12    12.1    true    1994-02-10    varchar_12    text_12
   643  13    13.1    false    1994-12-02    varchar_13    text_13
   644  14    14.1    true    2013-01-19    varchar_14    text_14
   645  15    15.1    false    2002-09-29    varchar_15    text_15
   646  16    16.1    true    2001-12-07    varchar_16    text_16
   647  17    17.1    false    1989-03-11    varchar_17    text_17
   648  18    18.1    true    2019-11-04    varchar_18    text_18
   649  19    19.1    false    2002-08-15    varchar_19    text_19
   650  20    20.1    true    1995-12-20    varchar_20    text_20
   651  21    21.1    false    2018-08-03    varchar_21    text_21
   652  22    22.1    true    1998-03-10    varchar_22    text_22
   653  23    23.1    false    2022-04-08    varchar_23    text_23
   654  24    24.1    true    1989-04-27    varchar_24    text_24
   655  25    25.1    false    2009-03-14    varchar_25    text_25
   656  26    26.1    true    2019-03-27    varchar_26    text_26
   657  27    27.1    false    1983-10-28    varchar_27    text_27
   658  28    28.1    true    1993-07-19    varchar_28    text_28
   659  29    29.1    false    1986-09-11    varchar_29    text_29
   660  30    30.1    true    1992-08-19    varchar_30    text_30
   661  31    31.1    false    1981-08-07    varchar_31    text_31
   662  32    32.1    true    1984-03-25    varchar_32    text_32
   663  33    33.1    false    2001-09-05    varchar_33    text_33
   664  34    34.1    true    2022-03-17    varchar_34    text_34
   665  35    35.1    false    2008-06-24    varchar_35    text_35
   666  36    36.1    true    1987-11-23    varchar_36    text_36
   667  37    37.1    false    2008-11-10    varchar_37    text_37
   668  38    38.1    true    1986-01-29    varchar_38    text_38
   669  39    39.1    false    1985-02-27    varchar_39    text_39
   670  40    40.1    true    2016-11-28    varchar_40    text_40
   671  41    41.1    false    1991-02-11    varchar_41    text_41
   672  42    42.1    true    2019-01-08    varchar_42    text_42
   673  43    43.1    false    2009-05-01    varchar_43    text_43
   674  44    44.1    true    1986-11-15    varchar_44    text_44
   675  45    45.1    false    2000-07-22    varchar_45    text_45
   676  46    46.1    true    2002-09-07    varchar_46    text_46
   677  47    47.1    false    1987-09-23    varchar_47    text_47
   678  48    48.1    true    1985-10-25    varchar_48    text_48
   679  49    49.1    false    1988-10-06    varchar_49    text_49
   680  select * from result_scan(last_query_id()) as u;
   681  col1    col2    col3    col4    col5    col6
   682  0    0.1    true    1982-03-24    varchar_0    text_0
   683  1    1.1    false    1982-07-31    varchar_1    text_1
   684  2    2.1    true    2002-04-13    varchar_2    text_2
   685  3    3.1    false    2019-09-29    varchar_3    text_3
   686  4    4.1    true    1996-08-20    varchar_4    text_4
   687  5    5.1    false    2008-10-13    varchar_5    text_5
   688  6    6.1    true    2002-03-05    varchar_6    text_6
   689  7    7.1    false    1993-11-07    varchar_7    text_7
   690  8    8.1    true    1994-01-08    varchar_8    text_8
   691  9    9.1    false    1999-09-17    varchar_9    text_9
   692  10    10.1    true    2003-09-28    varchar_10    text_10
   693  11    11.1    false    1984-01-22    varchar_11    text_11
   694  12    12.1    true    1994-02-10    varchar_12    text_12
   695  13    13.1    false    1994-12-02    varchar_13    text_13
   696  14    14.1    true    2013-01-19    varchar_14    text_14
   697  15    15.1    false    2002-09-29    varchar_15    text_15
   698  16    16.1    true    2001-12-07    varchar_16    text_16
   699  17    17.1    false    1989-03-11    varchar_17    text_17
   700  18    18.1    true    2019-11-04    varchar_18    text_18
   701  19    19.1    false    2002-08-15    varchar_19    text_19
   702  20    20.1    true    1995-12-20    varchar_20    text_20
   703  21    21.1    false    2018-08-03    varchar_21    text_21
   704  22    22.1    true    1998-03-10    varchar_22    text_22
   705  23    23.1    false    2022-04-08    varchar_23    text_23
   706  24    24.1    true    1989-04-27    varchar_24    text_24
   707  25    25.1    false    2009-03-14    varchar_25    text_25
   708  26    26.1    true    2019-03-27    varchar_26    text_26
   709  27    27.1    false    1983-10-28    varchar_27    text_27
   710  28    28.1    true    1993-07-19    varchar_28    text_28
   711  29    29.1    false    1986-09-11    varchar_29    text_29
   712  30    30.1    true    1992-08-19    varchar_30    text_30
   713  31    31.1    false    1981-08-07    varchar_31    text_31
   714  32    32.1    true    1984-03-25    varchar_32    text_32
   715  33    33.1    false    2001-09-05    varchar_33    text_33
   716  34    34.1    true    2022-03-17    varchar_34    text_34
   717  35    35.1    false    2008-06-24    varchar_35    text_35
   718  36    36.1    true    1987-11-23    varchar_36    text_36
   719  37    37.1    false    2008-11-10    varchar_37    text_37
   720  38    38.1    true    1986-01-29    varchar_38    text_38
   721  39    39.1    false    1985-02-27    varchar_39    text_39
   722  40    40.1    true    2016-11-28    varchar_40    text_40
   723  41    41.1    false    1991-02-11    varchar_41    text_41
   724  42    42.1    true    2019-01-08    varchar_42    text_42
   725  43    43.1    false    2009-05-01    varchar_43    text_43
   726  44    44.1    true    1986-11-15    varchar_44    text_44
   727  45    45.1    false    2000-07-22    varchar_45    text_45
   728  46    46.1    true    2002-09-07    varchar_46    text_46
   729  47    47.1    false    1987-09-23    varchar_47    text_47
   730  48    48.1    true    1985-10-25    varchar_48    text_48
   731  49    49.1    false    1988-10-06    varchar_49    text_49
   732  /* save_result */SELECT col1 FROM test_table where col1 < 30 MINUS SELECT col1  FROM test_table where col1 < 20;
   733  col1
   734  20
   735  21
   736  22
   737  23
   738  24
   739  25
   740  26
   741  27
   742  28
   743  29
   744  select * from result_scan(last_query_id()) as u;
   745  col1
   746  20
   747  21
   748  22
   749  23
   750  24
   751  25
   752  26
   753  27
   754  28
   755  29
   756  create view test_view as select * from test_table;
   757  show tables;
   758  Tables_in_save_query_result
   759  test_table
   760  test_view
   761  select * from result_scan(last_query_id()) as u;
   762  Tables_in_save_query_result
   763  test_table
   764  test_view
   765  show create view test_view;
   766  View    Create View    character_set_client    collation_connection
   767  test_view    create view test_view as select * from test_table;    utf8mb4    utf8mb4_general_ci
   768  select * from result_scan(last_query_id()) as u;
   769  View    Create View    character_set_client    collation_connection
   770  test_view    create view test_view as select * from test_table;    utf8mb4    utf8mb4_general_ci
   771  /* save_result */select * from test_view;
   772  col1    col2    col3    col4    col5    col6
   773  0    0.1    true    1982-03-24    varchar_0    text_0
   774  1    1.1    false    1982-07-31    varchar_1    text_1
   775  2    2.1    true    2002-04-13    varchar_2    text_2
   776  3    3.1    false    2019-09-29    varchar_3    text_3
   777  4    4.1    true    1996-08-20    varchar_4    text_4
   778  5    5.1    false    2008-10-13    varchar_5    text_5
   779  6    6.1    true    2002-03-05    varchar_6    text_6
   780  7    7.1    false    1993-11-07    varchar_7    text_7
   781  8    8.1    true    1994-01-08    varchar_8    text_8
   782  9    9.1    false    1999-09-17    varchar_9    text_9
   783  10    10.1    true    2003-09-28    varchar_10    text_10
   784  11    11.1    false    1984-01-22    varchar_11    text_11
   785  12    12.1    true    1994-02-10    varchar_12    text_12
   786  13    13.1    false    1994-12-02    varchar_13    text_13
   787  14    14.1    true    2013-01-19    varchar_14    text_14
   788  15    15.1    false    2002-09-29    varchar_15    text_15
   789  16    16.1    true    2001-12-07    varchar_16    text_16
   790  17    17.1    false    1989-03-11    varchar_17    text_17
   791  18    18.1    true    2019-11-04    varchar_18    text_18
   792  19    19.1    false    2002-08-15    varchar_19    text_19
   793  20    20.1    true    1995-12-20    varchar_20    text_20
   794  21    21.1    false    2018-08-03    varchar_21    text_21
   795  22    22.1    true    1998-03-10    varchar_22    text_22
   796  23    23.1    false    2022-04-08    varchar_23    text_23
   797  24    24.1    true    1989-04-27    varchar_24    text_24
   798  25    25.1    false    2009-03-14    varchar_25    text_25
   799  26    26.1    true    2019-03-27    varchar_26    text_26
   800  27    27.1    false    1983-10-28    varchar_27    text_27
   801  28    28.1    true    1993-07-19    varchar_28    text_28
   802  29    29.1    false    1986-09-11    varchar_29    text_29
   803  30    30.1    true    1992-08-19    varchar_30    text_30
   804  31    31.1    false    1981-08-07    varchar_31    text_31
   805  32    32.1    true    1984-03-25    varchar_32    text_32
   806  33    33.1    false    2001-09-05    varchar_33    text_33
   807  34    34.1    true    2022-03-17    varchar_34    text_34
   808  35    35.1    false    2008-06-24    varchar_35    text_35
   809  36    36.1    true    1987-11-23    varchar_36    text_36
   810  37    37.1    false    2008-11-10    varchar_37    text_37
   811  38    38.1    true    1986-01-29    varchar_38    text_38
   812  39    39.1    false    1985-02-27    varchar_39    text_39
   813  40    40.1    true    2016-11-28    varchar_40    text_40
   814  41    41.1    false    1991-02-11    varchar_41    text_41
   815  42    42.1    true    2019-01-08    varchar_42    text_42
   816  43    43.1    false    2009-05-01    varchar_43    text_43
   817  44    44.1    true    1986-11-15    varchar_44    text_44
   818  45    45.1    false    2000-07-22    varchar_45    text_45
   819  46    46.1    true    2002-09-07    varchar_46    text_46
   820  47    47.1    false    1987-09-23    varchar_47    text_47
   821  48    48.1    true    1985-10-25    varchar_48    text_48
   822  49    49.1    false    1988-10-06    varchar_49    text_49
   823  select * from result_scan(last_query_id()) as u;
   824  col1    col2    col3    col4    col5    col6
   825  0    0.1    true    1982-03-24    varchar_0    text_0
   826  1    1.1    false    1982-07-31    varchar_1    text_1
   827  2    2.1    true    2002-04-13    varchar_2    text_2
   828  3    3.1    false    2019-09-29    varchar_3    text_3
   829  4    4.1    true    1996-08-20    varchar_4    text_4
   830  5    5.1    false    2008-10-13    varchar_5    text_5
   831  6    6.1    true    2002-03-05    varchar_6    text_6
   832  7    7.1    false    1993-11-07    varchar_7    text_7
   833  8    8.1    true    1994-01-08    varchar_8    text_8
   834  9    9.1    false    1999-09-17    varchar_9    text_9
   835  10    10.1    true    2003-09-28    varchar_10    text_10
   836  11    11.1    false    1984-01-22    varchar_11    text_11
   837  12    12.1    true    1994-02-10    varchar_12    text_12
   838  13    13.1    false    1994-12-02    varchar_13    text_13
   839  14    14.1    true    2013-01-19    varchar_14    text_14
   840  15    15.1    false    2002-09-29    varchar_15    text_15
   841  16    16.1    true    2001-12-07    varchar_16    text_16
   842  17    17.1    false    1989-03-11    varchar_17    text_17
   843  18    18.1    true    2019-11-04    varchar_18    text_18
   844  19    19.1    false    2002-08-15    varchar_19    text_19
   845  20    20.1    true    1995-12-20    varchar_20    text_20
   846  21    21.1    false    2018-08-03    varchar_21    text_21
   847  22    22.1    true    1998-03-10    varchar_22    text_22
   848  23    23.1    false    2022-04-08    varchar_23    text_23
   849  24    24.1    true    1989-04-27    varchar_24    text_24
   850  25    25.1    false    2009-03-14    varchar_25    text_25
   851  26    26.1    true    2019-03-27    varchar_26    text_26
   852  27    27.1    false    1983-10-28    varchar_27    text_27
   853  28    28.1    true    1993-07-19    varchar_28    text_28
   854  29    29.1    false    1986-09-11    varchar_29    text_29
   855  30    30.1    true    1992-08-19    varchar_30    text_30
   856  31    31.1    false    1981-08-07    varchar_31    text_31
   857  32    32.1    true    1984-03-25    varchar_32    text_32
   858  33    33.1    false    2001-09-05    varchar_33    text_33
   859  34    34.1    true    2022-03-17    varchar_34    text_34
   860  35    35.1    false    2008-06-24    varchar_35    text_35
   861  36    36.1    true    1987-11-23    varchar_36    text_36
   862  37    37.1    false    2008-11-10    varchar_37    text_37
   863  38    38.1    true    1986-01-29    varchar_38    text_38
   864  39    39.1    false    1985-02-27    varchar_39    text_39
   865  40    40.1    true    2016-11-28    varchar_40    text_40
   866  41    41.1    false    1991-02-11    varchar_41    text_41
   867  42    42.1    true    2019-01-08    varchar_42    text_42
   868  43    43.1    false    2009-05-01    varchar_43    text_43
   869  44    44.1    true    1986-11-15    varchar_44    text_44
   870  45    45.1    false    2000-07-22    varchar_45    text_45
   871  46    46.1    true    2002-09-07    varchar_46    text_46
   872  47    47.1    false    1987-09-23    varchar_47    text_47
   873  48    48.1    true    1985-10-25    varchar_48    text_48
   874  49    49.1    false    1988-10-06    varchar_49    text_49
   875  /* save_result */select col1 from test_view;
   876  col1
   877  0
   878  1
   879  2
   880  3
   881  4
   882  5
   883  6
   884  7
   885  8
   886  9
   887  10
   888  11
   889  12
   890  13
   891  14
   892  15
   893  16
   894  17
   895  18
   896  19
   897  20
   898  21
   899  22
   900  23
   901  24
   902  25
   903  26
   904  27
   905  28
   906  29
   907  30
   908  31
   909  32
   910  33
   911  34
   912  35
   913  36
   914  37
   915  38
   916  39
   917  40
   918  41
   919  42
   920  43
   921  44
   922  45
   923  46
   924  47
   925  48
   926  49
   927  select * from result_scan(last_query_id()) as u;
   928  col1
   929  0
   930  1
   931  2
   932  3
   933  4
   934  5
   935  6
   936  7
   937  8
   938  9
   939  10
   940  11
   941  12
   942  13
   943  14
   944  15
   945  16
   946  17
   947  18
   948  19
   949  20
   950  21
   951  22
   952  23
   953  24
   954  25
   955  26
   956  27
   957  28
   958  29
   959  30
   960  31
   961  32
   962  33
   963  34
   964  35
   965  36
   966  37
   967  38
   968  39
   969  40
   970  41
   971  42
   972  43
   973  44
   974  45
   975  46
   976  47
   977  48
   978  49
   979  /* save_result */select * from test_view where col1 > 30;
   980  col1    col2    col3    col4    col5    col6
   981  31    31.1    false    1981-08-07    varchar_31    text_31
   982  32    32.1    true    1984-03-25    varchar_32    text_32
   983  33    33.1    false    2001-09-05    varchar_33    text_33
   984  34    34.1    true    2022-03-17    varchar_34    text_34
   985  35    35.1    false    2008-06-24    varchar_35    text_35
   986  36    36.1    true    1987-11-23    varchar_36    text_36
   987  37    37.1    false    2008-11-10    varchar_37    text_37
   988  38    38.1    true    1986-01-29    varchar_38    text_38
   989  39    39.1    false    1985-02-27    varchar_39    text_39
   990  40    40.1    true    2016-11-28    varchar_40    text_40
   991  41    41.1    false    1991-02-11    varchar_41    text_41
   992  42    42.1    true    2019-01-08    varchar_42    text_42
   993  43    43.1    false    2009-05-01    varchar_43    text_43
   994  44    44.1    true    1986-11-15    varchar_44    text_44
   995  45    45.1    false    2000-07-22    varchar_45    text_45
   996  46    46.1    true    2002-09-07    varchar_46    text_46
   997  47    47.1    false    1987-09-23    varchar_47    text_47
   998  48    48.1    true    1985-10-25    varchar_48    text_48
   999  49    49.1    false    1988-10-06    varchar_49    text_49
  1000  select * from result_scan(last_query_id()) as u;
  1001  col1    col2    col3    col4    col5    col6
  1002  31    31.1    false    1981-08-07    varchar_31    text_31
  1003  32    32.1    true    1984-03-25    varchar_32    text_32
  1004  33    33.1    false    2001-09-05    varchar_33    text_33
  1005  34    34.1    true    2022-03-17    varchar_34    text_34
  1006  35    35.1    false    2008-06-24    varchar_35    text_35
  1007  36    36.1    true    1987-11-23    varchar_36    text_36
  1008  37    37.1    false    2008-11-10    varchar_37    text_37
  1009  38    38.1    true    1986-01-29    varchar_38    text_38
  1010  39    39.1    false    1985-02-27    varchar_39    text_39
  1011  40    40.1    true    2016-11-28    varchar_40    text_40
  1012  41    41.1    false    1991-02-11    varchar_41    text_41
  1013  42    42.1    true    2019-01-08    varchar_42    text_42
  1014  43    43.1    false    2009-05-01    varchar_43    text_43
  1015  44    44.1    true    1986-11-15    varchar_44    text_44
  1016  45    45.1    false    2000-07-22    varchar_45    text_45
  1017  46    46.1    true    2002-09-07    varchar_46    text_46
  1018  47    47.1    false    1987-09-23    varchar_47    text_47
  1019  48    48.1    true    1985-10-25    varchar_48    text_48
  1020  49    49.1    false    1988-10-06    varchar_49    text_49
  1021  /* save_result */select * from test_view where col1 < 10;
  1022  col1    col2    col3    col4    col5    col6
  1023  0    0.1    true    1982-03-24    varchar_0    text_0
  1024  1    1.1    false    1982-07-31    varchar_1    text_1
  1025  2    2.1    true    2002-04-13    varchar_2    text_2
  1026  3    3.1    false    2019-09-29    varchar_3    text_3
  1027  4    4.1    true    1996-08-20    varchar_4    text_4
  1028  5    5.1    false    2008-10-13    varchar_5    text_5
  1029  6    6.1    true    2002-03-05    varchar_6    text_6
  1030  7    7.1    false    1993-11-07    varchar_7    text_7
  1031  8    8.1    true    1994-01-08    varchar_8    text_8
  1032  9    9.1    false    1999-09-17    varchar_9    text_9
  1033  select * from result_scan(last_query_id()) as u;
  1034  col1    col2    col3    col4    col5    col6
  1035  0    0.1    true    1982-03-24    varchar_0    text_0
  1036  1    1.1    false    1982-07-31    varchar_1    text_1
  1037  2    2.1    true    2002-04-13    varchar_2    text_2
  1038  3    3.1    false    2019-09-29    varchar_3    text_3
  1039  4    4.1    true    1996-08-20    varchar_4    text_4
  1040  5    5.1    false    2008-10-13    varchar_5    text_5
  1041  6    6.1    true    2002-03-05    varchar_6    text_6
  1042  7    7.1    false    1993-11-07    varchar_7    text_7
  1043  8    8.1    true    1994-01-08    varchar_8    text_8
  1044  9    9.1    false    1999-09-17    varchar_9    text_9
  1045  /* save_result */select * from test_view where col1 = 10;
  1046  col1    col2    col3    col4    col5    col6
  1047  10    10.1    true    2003-09-28    varchar_10    text_10
  1048  select * from result_scan(last_query_id()) as u;
  1049  col1    col2    col3    col4    col5    col6
  1050  10    10.1    true    2003-09-28    varchar_10    text_10
  1051  /* save_result */select * from test_view limit 1;
  1052  col1    col2    col3    col4    col5    col6
  1053  0    0.1    true    1982-03-24    varchar_0    text_0
  1054  select * from result_scan(last_query_id()) as u;
  1055  col1    col2    col3    col4    col5    col6
  1056  0    0.1    true    1982-03-24    varchar_0    text_0
  1057  /* save_result */select * from test_view order by col1 asc;
  1058  col1    col2    col3    col4    col5    col6
  1059  0    0.1    true    1982-03-24    varchar_0    text_0
  1060  1    1.1    false    1982-07-31    varchar_1    text_1
  1061  2    2.1    true    2002-04-13    varchar_2    text_2
  1062  3    3.1    false    2019-09-29    varchar_3    text_3
  1063  4    4.1    true    1996-08-20    varchar_4    text_4
  1064  5    5.1    false    2008-10-13    varchar_5    text_5
  1065  6    6.1    true    2002-03-05    varchar_6    text_6
  1066  7    7.1    false    1993-11-07    varchar_7    text_7
  1067  8    8.1    true    1994-01-08    varchar_8    text_8
  1068  9    9.1    false    1999-09-17    varchar_9    text_9
  1069  10    10.1    true    2003-09-28    varchar_10    text_10
  1070  11    11.1    false    1984-01-22    varchar_11    text_11
  1071  12    12.1    true    1994-02-10    varchar_12    text_12
  1072  13    13.1    false    1994-12-02    varchar_13    text_13
  1073  14    14.1    true    2013-01-19    varchar_14    text_14
  1074  15    15.1    false    2002-09-29    varchar_15    text_15
  1075  16    16.1    true    2001-12-07    varchar_16    text_16
  1076  17    17.1    false    1989-03-11    varchar_17    text_17
  1077  18    18.1    true    2019-11-04    varchar_18    text_18
  1078  19    19.1    false    2002-08-15    varchar_19    text_19
  1079  20    20.1    true    1995-12-20    varchar_20    text_20
  1080  21    21.1    false    2018-08-03    varchar_21    text_21
  1081  22    22.1    true    1998-03-10    varchar_22    text_22
  1082  23    23.1    false    2022-04-08    varchar_23    text_23
  1083  24    24.1    true    1989-04-27    varchar_24    text_24
  1084  25    25.1    false    2009-03-14    varchar_25    text_25
  1085  26    26.1    true    2019-03-27    varchar_26    text_26
  1086  27    27.1    false    1983-10-28    varchar_27    text_27
  1087  28    28.1    true    1993-07-19    varchar_28    text_28
  1088  29    29.1    false    1986-09-11    varchar_29    text_29
  1089  30    30.1    true    1992-08-19    varchar_30    text_30
  1090  31    31.1    false    1981-08-07    varchar_31    text_31
  1091  32    32.1    true    1984-03-25    varchar_32    text_32
  1092  33    33.1    false    2001-09-05    varchar_33    text_33
  1093  34    34.1    true    2022-03-17    varchar_34    text_34
  1094  35    35.1    false    2008-06-24    varchar_35    text_35
  1095  36    36.1    true    1987-11-23    varchar_36    text_36
  1096  37    37.1    false    2008-11-10    varchar_37    text_37
  1097  38    38.1    true    1986-01-29    varchar_38    text_38
  1098  39    39.1    false    1985-02-27    varchar_39    text_39
  1099  40    40.1    true    2016-11-28    varchar_40    text_40
  1100  41    41.1    false    1991-02-11    varchar_41    text_41
  1101  42    42.1    true    2019-01-08    varchar_42    text_42
  1102  43    43.1    false    2009-05-01    varchar_43    text_43
  1103  44    44.1    true    1986-11-15    varchar_44    text_44
  1104  45    45.1    false    2000-07-22    varchar_45    text_45
  1105  46    46.1    true    2002-09-07    varchar_46    text_46
  1106  47    47.1    false    1987-09-23    varchar_47    text_47
  1107  48    48.1    true    1985-10-25    varchar_48    text_48
  1108  49    49.1    false    1988-10-06    varchar_49    text_49
  1109  select * from result_scan(last_query_id()) as u;
  1110  col1    col2    col3    col4    col5    col6
  1111  0    0.1    true    1982-03-24    varchar_0    text_0
  1112  1    1.1    false    1982-07-31    varchar_1    text_1
  1113  2    2.1    true    2002-04-13    varchar_2    text_2
  1114  3    3.1    false    2019-09-29    varchar_3    text_3
  1115  4    4.1    true    1996-08-20    varchar_4    text_4
  1116  5    5.1    false    2008-10-13    varchar_5    text_5
  1117  6    6.1    true    2002-03-05    varchar_6    text_6
  1118  7    7.1    false    1993-11-07    varchar_7    text_7
  1119  8    8.1    true    1994-01-08    varchar_8    text_8
  1120  9    9.1    false    1999-09-17    varchar_9    text_9
  1121  10    10.1    true    2003-09-28    varchar_10    text_10
  1122  11    11.1    false    1984-01-22    varchar_11    text_11
  1123  12    12.1    true    1994-02-10    varchar_12    text_12
  1124  13    13.1    false    1994-12-02    varchar_13    text_13
  1125  14    14.1    true    2013-01-19    varchar_14    text_14
  1126  15    15.1    false    2002-09-29    varchar_15    text_15
  1127  16    16.1    true    2001-12-07    varchar_16    text_16
  1128  17    17.1    false    1989-03-11    varchar_17    text_17
  1129  18    18.1    true    2019-11-04    varchar_18    text_18
  1130  19    19.1    false    2002-08-15    varchar_19    text_19
  1131  20    20.1    true    1995-12-20    varchar_20    text_20
  1132  21    21.1    false    2018-08-03    varchar_21    text_21
  1133  22    22.1    true    1998-03-10    varchar_22    text_22
  1134  23    23.1    false    2022-04-08    varchar_23    text_23
  1135  24    24.1    true    1989-04-27    varchar_24    text_24
  1136  25    25.1    false    2009-03-14    varchar_25    text_25
  1137  26    26.1    true    2019-03-27    varchar_26    text_26
  1138  27    27.1    false    1983-10-28    varchar_27    text_27
  1139  28    28.1    true    1993-07-19    varchar_28    text_28
  1140  29    29.1    false    1986-09-11    varchar_29    text_29
  1141  30    30.1    true    1992-08-19    varchar_30    text_30
  1142  31    31.1    false    1981-08-07    varchar_31    text_31
  1143  32    32.1    true    1984-03-25    varchar_32    text_32
  1144  33    33.1    false    2001-09-05    varchar_33    text_33
  1145  34    34.1    true    2022-03-17    varchar_34    text_34
  1146  35    35.1    false    2008-06-24    varchar_35    text_35
  1147  36    36.1    true    1987-11-23    varchar_36    text_36
  1148  37    37.1    false    2008-11-10    varchar_37    text_37
  1149  38    38.1    true    1986-01-29    varchar_38    text_38
  1150  39    39.1    false    1985-02-27    varchar_39    text_39
  1151  40    40.1    true    2016-11-28    varchar_40    text_40
  1152  41    41.1    false    1991-02-11    varchar_41    text_41
  1153  42    42.1    true    2019-01-08    varchar_42    text_42
  1154  43    43.1    false    2009-05-01    varchar_43    text_43
  1155  44    44.1    true    1986-11-15    varchar_44    text_44
  1156  45    45.1    false    2000-07-22    varchar_45    text_45
  1157  46    46.1    true    2002-09-07    varchar_46    text_46
  1158  47    47.1    false    1987-09-23    varchar_47    text_47
  1159  48    48.1    true    1985-10-25    varchar_48    text_48
  1160  49    49.1    false    1988-10-06    varchar_49    text_49
  1161  /* save_result */select t1.col1,t2.col1 from test_view t1  left join test_view t2 on t1.col1=t2.col1;
  1162  col1    col1
  1163  0    0
  1164  1    1
  1165  2    2
  1166  3    3
  1167  4    4
  1168  5    5
  1169  6    6
  1170  7    7
  1171  8    8
  1172  9    9
  1173  10    10
  1174  11    11
  1175  12    12
  1176  13    13
  1177  14    14
  1178  15    15
  1179  16    16
  1180  17    17
  1181  18    18
  1182  19    19
  1183  20    20
  1184  21    21
  1185  22    22
  1186  23    23
  1187  24    24
  1188  25    25
  1189  26    26
  1190  27    27
  1191  28    28
  1192  29    29
  1193  30    30
  1194  31    31
  1195  32    32
  1196  33    33
  1197  34    34
  1198  35    35
  1199  36    36
  1200  37    37
  1201  38    38
  1202  39    39
  1203  40    40
  1204  41    41
  1205  42    42
  1206  43    43
  1207  44    44
  1208  45    45
  1209  46    46
  1210  47    47
  1211  48    48
  1212  49    49
  1213  select * from result_scan(last_query_id()) as u;
  1214  col1_0    col1_1
  1215  0    0
  1216  1    1
  1217  2    2
  1218  3    3
  1219  4    4
  1220  5    5
  1221  6    6
  1222  7    7
  1223  8    8
  1224  9    9
  1225  10    10
  1226  11    11
  1227  12    12
  1228  13    13
  1229  14    14
  1230  15    15
  1231  16    16
  1232  17    17
  1233  18    18
  1234  19    19
  1235  20    20
  1236  21    21
  1237  22    22
  1238  23    23
  1239  24    24
  1240  25    25
  1241  26    26
  1242  27    27
  1243  28    28
  1244  29    29
  1245  30    30
  1246  31    31
  1247  32    32
  1248  33    33
  1249  34    34
  1250  35    35
  1251  36    36
  1252  37    37
  1253  38    38
  1254  39    39
  1255  40    40
  1256  41    41
  1257  42    42
  1258  43    43
  1259  44    44
  1260  45    45
  1261  46    46
  1262  47    47
  1263  48    48
  1264  49    49
  1265  /* save_result */select t1.col1,t2.col1 from test_view t1  right join test_view t2 on t1.col1=t2.col1;
  1266  col1    col1
  1267  0    0
  1268  1    1
  1269  2    2
  1270  3    3
  1271  4    4
  1272  5    5
  1273  6    6
  1274  7    7
  1275  8    8
  1276  9    9
  1277  10    10
  1278  11    11
  1279  12    12
  1280  13    13
  1281  14    14
  1282  15    15
  1283  16    16
  1284  17    17
  1285  18    18
  1286  19    19
  1287  20    20
  1288  21    21
  1289  22    22
  1290  23    23
  1291  24    24
  1292  25    25
  1293  26    26
  1294  27    27
  1295  28    28
  1296  29    29
  1297  30    30
  1298  31    31
  1299  32    32
  1300  33    33
  1301  34    34
  1302  35    35
  1303  36    36
  1304  37    37
  1305  38    38
  1306  39    39
  1307  40    40
  1308  41    41
  1309  42    42
  1310  43    43
  1311  44    44
  1312  45    45
  1313  46    46
  1314  47    47
  1315  48    48
  1316  49    49
  1317  select * from result_scan(last_query_id()) as u;
  1318  col1_0    col1_1
  1319  0    0
  1320  1    1
  1321  2    2
  1322  3    3
  1323  4    4
  1324  5    5
  1325  6    6
  1326  7    7
  1327  8    8
  1328  9    9
  1329  10    10
  1330  11    11
  1331  12    12
  1332  13    13
  1333  14    14
  1334  15    15
  1335  16    16
  1336  17    17
  1337  18    18
  1338  19    19
  1339  20    20
  1340  21    21
  1341  22    22
  1342  23    23
  1343  24    24
  1344  25    25
  1345  26    26
  1346  27    27
  1347  28    28
  1348  29    29
  1349  30    30
  1350  31    31
  1351  32    32
  1352  33    33
  1353  34    34
  1354  35    35
  1355  36    36
  1356  37    37
  1357  38    38
  1358  39    39
  1359  40    40
  1360  41    41
  1361  42    42
  1362  43    43
  1363  44    44
  1364  45    45
  1365  46    46
  1366  47    47
  1367  48    48
  1368  49    49
  1369  /* save_result */select * from test_view union select * from test_view;
  1370  col1    col2    col3    col4    col5    col6
  1371  0    0.1    true    1982-03-24    varchar_0    text_0
  1372  1    1.1    false    1982-07-31    varchar_1    text_1
  1373  2    2.1    true    2002-04-13    varchar_2    text_2
  1374  3    3.1    false    2019-09-29    varchar_3    text_3
  1375  4    4.1    true    1996-08-20    varchar_4    text_4
  1376  5    5.1    false    2008-10-13    varchar_5    text_5
  1377  6    6.1    true    2002-03-05    varchar_6    text_6
  1378  7    7.1    false    1993-11-07    varchar_7    text_7
  1379  8    8.1    true    1994-01-08    varchar_8    text_8
  1380  9    9.1    false    1999-09-17    varchar_9    text_9
  1381  10    10.1    true    2003-09-28    varchar_10    text_10
  1382  11    11.1    false    1984-01-22    varchar_11    text_11
  1383  12    12.1    true    1994-02-10    varchar_12    text_12
  1384  13    13.1    false    1994-12-02    varchar_13    text_13
  1385  14    14.1    true    2013-01-19    varchar_14    text_14
  1386  15    15.1    false    2002-09-29    varchar_15    text_15
  1387  16    16.1    true    2001-12-07    varchar_16    text_16
  1388  17    17.1    false    1989-03-11    varchar_17    text_17
  1389  18    18.1    true    2019-11-04    varchar_18    text_18
  1390  19    19.1    false    2002-08-15    varchar_19    text_19
  1391  20    20.1    true    1995-12-20    varchar_20    text_20
  1392  21    21.1    false    2018-08-03    varchar_21    text_21
  1393  22    22.1    true    1998-03-10    varchar_22    text_22
  1394  23    23.1    false    2022-04-08    varchar_23    text_23
  1395  24    24.1    true    1989-04-27    varchar_24    text_24
  1396  25    25.1    false    2009-03-14    varchar_25    text_25
  1397  26    26.1    true    2019-03-27    varchar_26    text_26
  1398  27    27.1    false    1983-10-28    varchar_27    text_27
  1399  28    28.1    true    1993-07-19    varchar_28    text_28
  1400  29    29.1    false    1986-09-11    varchar_29    text_29
  1401  30    30.1    true    1992-08-19    varchar_30    text_30
  1402  31    31.1    false    1981-08-07    varchar_31    text_31
  1403  32    32.1    true    1984-03-25    varchar_32    text_32
  1404  33    33.1    false    2001-09-05    varchar_33    text_33
  1405  34    34.1    true    2022-03-17    varchar_34    text_34
  1406  35    35.1    false    2008-06-24    varchar_35    text_35
  1407  36    36.1    true    1987-11-23    varchar_36    text_36
  1408  37    37.1    false    2008-11-10    varchar_37    text_37
  1409  38    38.1    true    1986-01-29    varchar_38    text_38
  1410  39    39.1    false    1985-02-27    varchar_39    text_39
  1411  40    40.1    true    2016-11-28    varchar_40    text_40
  1412  41    41.1    false    1991-02-11    varchar_41    text_41
  1413  42    42.1    true    2019-01-08    varchar_42    text_42
  1414  43    43.1    false    2009-05-01    varchar_43    text_43
  1415  44    44.1    true    1986-11-15    varchar_44    text_44
  1416  45    45.1    false    2000-07-22    varchar_45    text_45
  1417  46    46.1    true    2002-09-07    varchar_46    text_46
  1418  47    47.1    false    1987-09-23    varchar_47    text_47
  1419  48    48.1    true    1985-10-25    varchar_48    text_48
  1420  49    49.1    false    1988-10-06    varchar_49    text_49
  1421  select * from result_scan(last_query_id()) as u;
  1422  col1    col2    col3    col4    col5    col6
  1423  0    0.1    true    1982-03-24    varchar_0    text_0
  1424  1    1.1    false    1982-07-31    varchar_1    text_1
  1425  2    2.1    true    2002-04-13    varchar_2    text_2
  1426  3    3.1    false    2019-09-29    varchar_3    text_3
  1427  4    4.1    true    1996-08-20    varchar_4    text_4
  1428  5    5.1    false    2008-10-13    varchar_5    text_5
  1429  6    6.1    true    2002-03-05    varchar_6    text_6
  1430  7    7.1    false    1993-11-07    varchar_7    text_7
  1431  8    8.1    true    1994-01-08    varchar_8    text_8
  1432  9    9.1    false    1999-09-17    varchar_9    text_9
  1433  10    10.1    true    2003-09-28    varchar_10    text_10
  1434  11    11.1    false    1984-01-22    varchar_11    text_11
  1435  12    12.1    true    1994-02-10    varchar_12    text_12
  1436  13    13.1    false    1994-12-02    varchar_13    text_13
  1437  14    14.1    true    2013-01-19    varchar_14    text_14
  1438  15    15.1    false    2002-09-29    varchar_15    text_15
  1439  16    16.1    true    2001-12-07    varchar_16    text_16
  1440  17    17.1    false    1989-03-11    varchar_17    text_17
  1441  18    18.1    true    2019-11-04    varchar_18    text_18
  1442  19    19.1    false    2002-08-15    varchar_19    text_19
  1443  20    20.1    true    1995-12-20    varchar_20    text_20
  1444  21    21.1    false    2018-08-03    varchar_21    text_21
  1445  22    22.1    true    1998-03-10    varchar_22    text_22
  1446  23    23.1    false    2022-04-08    varchar_23    text_23
  1447  24    24.1    true    1989-04-27    varchar_24    text_24
  1448  25    25.1    false    2009-03-14    varchar_25    text_25
  1449  26    26.1    true    2019-03-27    varchar_26    text_26
  1450  27    27.1    false    1983-10-28    varchar_27    text_27
  1451  28    28.1    true    1993-07-19    varchar_28    text_28
  1452  29    29.1    false    1986-09-11    varchar_29    text_29
  1453  30    30.1    true    1992-08-19    varchar_30    text_30
  1454  31    31.1    false    1981-08-07    varchar_31    text_31
  1455  32    32.1    true    1984-03-25    varchar_32    text_32
  1456  33    33.1    false    2001-09-05    varchar_33    text_33
  1457  34    34.1    true    2022-03-17    varchar_34    text_34
  1458  35    35.1    false    2008-06-24    varchar_35    text_35
  1459  36    36.1    true    1987-11-23    varchar_36    text_36
  1460  37    37.1    false    2008-11-10    varchar_37    text_37
  1461  38    38.1    true    1986-01-29    varchar_38    text_38
  1462  39    39.1    false    1985-02-27    varchar_39    text_39
  1463  40    40.1    true    2016-11-28    varchar_40    text_40
  1464  41    41.1    false    1991-02-11    varchar_41    text_41
  1465  42    42.1    true    2019-01-08    varchar_42    text_42
  1466  43    43.1    false    2009-05-01    varchar_43    text_43
  1467  44    44.1    true    1986-11-15    varchar_44    text_44
  1468  45    45.1    false    2000-07-22    varchar_45    text_45
  1469  46    46.1    true    2002-09-07    varchar_46    text_46
  1470  47    47.1    false    1987-09-23    varchar_47    text_47
  1471  48    48.1    true    1985-10-25    varchar_48    text_48
  1472  49    49.1    false    1988-10-06    varchar_49    text_49
  1473  /* save_result */SELECT col1 FROM test_view where col1 < 30 MINUS SELECT col1  FROM test_view where col1 < 20;
  1474  col1
  1475  20
  1476  21
  1477  22
  1478  23
  1479  24
  1480  25
  1481  26
  1482  27
  1483  28
  1484  29
  1485  select * from result_scan(last_query_id()) as u;
  1486  col1
  1487  20
  1488  21
  1489  22
  1490  23
  1491  24
  1492  25
  1493  26
  1494  27
  1495  28
  1496  29
  1497  begin;
  1498  /* save_result */select * from test_table;
  1499  col1    col2    col3    col4    col5    col6
  1500  0    0.1    true    1982-03-24    varchar_0    text_0
  1501  1    1.1    false    1982-07-31    varchar_1    text_1
  1502  2    2.1    true    2002-04-13    varchar_2    text_2
  1503  3    3.1    false    2019-09-29    varchar_3    text_3
  1504  4    4.1    true    1996-08-20    varchar_4    text_4
  1505  5    5.1    false    2008-10-13    varchar_5    text_5
  1506  6    6.1    true    2002-03-05    varchar_6    text_6
  1507  7    7.1    false    1993-11-07    varchar_7    text_7
  1508  8    8.1    true    1994-01-08    varchar_8    text_8
  1509  9    9.1    false    1999-09-17    varchar_9    text_9
  1510  10    10.1    true    2003-09-28    varchar_10    text_10
  1511  11    11.1    false    1984-01-22    varchar_11    text_11
  1512  12    12.1    true    1994-02-10    varchar_12    text_12
  1513  13    13.1    false    1994-12-02    varchar_13    text_13
  1514  14    14.1    true    2013-01-19    varchar_14    text_14
  1515  15    15.1    false    2002-09-29    varchar_15    text_15
  1516  16    16.1    true    2001-12-07    varchar_16    text_16
  1517  17    17.1    false    1989-03-11    varchar_17    text_17
  1518  18    18.1    true    2019-11-04    varchar_18    text_18
  1519  19    19.1    false    2002-08-15    varchar_19    text_19
  1520  20    20.1    true    1995-12-20    varchar_20    text_20
  1521  21    21.1    false    2018-08-03    varchar_21    text_21
  1522  22    22.1    true    1998-03-10    varchar_22    text_22
  1523  23    23.1    false    2022-04-08    varchar_23    text_23
  1524  24    24.1    true    1989-04-27    varchar_24    text_24
  1525  25    25.1    false    2009-03-14    varchar_25    text_25
  1526  26    26.1    true    2019-03-27    varchar_26    text_26
  1527  27    27.1    false    1983-10-28    varchar_27    text_27
  1528  28    28.1    true    1993-07-19    varchar_28    text_28
  1529  29    29.1    false    1986-09-11    varchar_29    text_29
  1530  30    30.1    true    1992-08-19    varchar_30    text_30
  1531  31    31.1    false    1981-08-07    varchar_31    text_31
  1532  32    32.1    true    1984-03-25    varchar_32    text_32
  1533  33    33.1    false    2001-09-05    varchar_33    text_33
  1534  34    34.1    true    2022-03-17    varchar_34    text_34
  1535  35    35.1    false    2008-06-24    varchar_35    text_35
  1536  36    36.1    true    1987-11-23    varchar_36    text_36
  1537  37    37.1    false    2008-11-10    varchar_37    text_37
  1538  38    38.1    true    1986-01-29    varchar_38    text_38
  1539  39    39.1    false    1985-02-27    varchar_39    text_39
  1540  40    40.1    true    2016-11-28    varchar_40    text_40
  1541  41    41.1    false    1991-02-11    varchar_41    text_41
  1542  42    42.1    true    2019-01-08    varchar_42    text_42
  1543  43    43.1    false    2009-05-01    varchar_43    text_43
  1544  44    44.1    true    1986-11-15    varchar_44    text_44
  1545  45    45.1    false    2000-07-22    varchar_45    text_45
  1546  46    46.1    true    2002-09-07    varchar_46    text_46
  1547  47    47.1    false    1987-09-23    varchar_47    text_47
  1548  48    48.1    true    1985-10-25    varchar_48    text_48
  1549  49    49.1    false    1988-10-06    varchar_49    text_49
  1550  select * from result_scan(last_query_id()) as u;
  1551  col1    col2    col3    col4    col5    col6
  1552  0    0.1    true    1982-03-24    varchar_0    text_0
  1553  1    1.1    false    1982-07-31    varchar_1    text_1
  1554  2    2.1    true    2002-04-13    varchar_2    text_2
  1555  3    3.1    false    2019-09-29    varchar_3    text_3
  1556  4    4.1    true    1996-08-20    varchar_4    text_4
  1557  5    5.1    false    2008-10-13    varchar_5    text_5
  1558  6    6.1    true    2002-03-05    varchar_6    text_6
  1559  7    7.1    false    1993-11-07    varchar_7    text_7
  1560  8    8.1    true    1994-01-08    varchar_8    text_8
  1561  9    9.1    false    1999-09-17    varchar_9    text_9
  1562  10    10.1    true    2003-09-28    varchar_10    text_10
  1563  11    11.1    false    1984-01-22    varchar_11    text_11
  1564  12    12.1    true    1994-02-10    varchar_12    text_12
  1565  13    13.1    false    1994-12-02    varchar_13    text_13
  1566  14    14.1    true    2013-01-19    varchar_14    text_14
  1567  15    15.1    false    2002-09-29    varchar_15    text_15
  1568  16    16.1    true    2001-12-07    varchar_16    text_16
  1569  17    17.1    false    1989-03-11    varchar_17    text_17
  1570  18    18.1    true    2019-11-04    varchar_18    text_18
  1571  19    19.1    false    2002-08-15    varchar_19    text_19
  1572  20    20.1    true    1995-12-20    varchar_20    text_20
  1573  21    21.1    false    2018-08-03    varchar_21    text_21
  1574  22    22.1    true    1998-03-10    varchar_22    text_22
  1575  23    23.1    false    2022-04-08    varchar_23    text_23
  1576  24    24.1    true    1989-04-27    varchar_24    text_24
  1577  25    25.1    false    2009-03-14    varchar_25    text_25
  1578  26    26.1    true    2019-03-27    varchar_26    text_26
  1579  27    27.1    false    1983-10-28    varchar_27    text_27
  1580  28    28.1    true    1993-07-19    varchar_28    text_28
  1581  29    29.1    false    1986-09-11    varchar_29    text_29
  1582  30    30.1    true    1992-08-19    varchar_30    text_30
  1583  31    31.1    false    1981-08-07    varchar_31    text_31
  1584  32    32.1    true    1984-03-25    varchar_32    text_32
  1585  33    33.1    false    2001-09-05    varchar_33    text_33
  1586  34    34.1    true    2022-03-17    varchar_34    text_34
  1587  35    35.1    false    2008-06-24    varchar_35    text_35
  1588  36    36.1    true    1987-11-23    varchar_36    text_36
  1589  37    37.1    false    2008-11-10    varchar_37    text_37
  1590  38    38.1    true    1986-01-29    varchar_38    text_38
  1591  39    39.1    false    1985-02-27    varchar_39    text_39
  1592  40    40.1    true    2016-11-28    varchar_40    text_40
  1593  41    41.1    false    1991-02-11    varchar_41    text_41
  1594  42    42.1    true    2019-01-08    varchar_42    text_42
  1595  43    43.1    false    2009-05-01    varchar_43    text_43
  1596  44    44.1    true    1986-11-15    varchar_44    text_44
  1597  45    45.1    false    2000-07-22    varchar_45    text_45
  1598  46    46.1    true    2002-09-07    varchar_46    text_46
  1599  47    47.1    false    1987-09-23    varchar_47    text_47
  1600  48    48.1    true    1985-10-25    varchar_48    text_48
  1601  49    49.1    false    1988-10-06    varchar_49    text_49
  1602  /* save_result */select col1 from test_table;
  1603  col1
  1604  0
  1605  1
  1606  2
  1607  3
  1608  4
  1609  5
  1610  6
  1611  7
  1612  8
  1613  9
  1614  10
  1615  11
  1616  12
  1617  13
  1618  14
  1619  15
  1620  16
  1621  17
  1622  18
  1623  19
  1624  20
  1625  21
  1626  22
  1627  23
  1628  24
  1629  25
  1630  26
  1631  27
  1632  28
  1633  29
  1634  30
  1635  31
  1636  32
  1637  33
  1638  34
  1639  35
  1640  36
  1641  37
  1642  38
  1643  39
  1644  40
  1645  41
  1646  42
  1647  43
  1648  44
  1649  45
  1650  46
  1651  47
  1652  48
  1653  49
  1654  select * from result_scan(last_query_id()) as u;
  1655  col1
  1656  0
  1657  1
  1658  2
  1659  3
  1660  4
  1661  5
  1662  6
  1663  7
  1664  8
  1665  9
  1666  10
  1667  11
  1668  12
  1669  13
  1670  14
  1671  15
  1672  16
  1673  17
  1674  18
  1675  19
  1676  20
  1677  21
  1678  22
  1679  23
  1680  24
  1681  25
  1682  26
  1683  27
  1684  28
  1685  29
  1686  30
  1687  31
  1688  32
  1689  33
  1690  34
  1691  35
  1692  36
  1693  37
  1694  38
  1695  39
  1696  40
  1697  41
  1698  42
  1699  43
  1700  44
  1701  45
  1702  46
  1703  47
  1704  48
  1705  49
  1706  /* save_result */select * from test_table where col1 > 30;
  1707  col1    col2    col3    col4    col5    col6
  1708  31    31.1    false    1981-08-07    varchar_31    text_31
  1709  32    32.1    true    1984-03-25    varchar_32    text_32
  1710  33    33.1    false    2001-09-05    varchar_33    text_33
  1711  34    34.1    true    2022-03-17    varchar_34    text_34
  1712  35    35.1    false    2008-06-24    varchar_35    text_35
  1713  36    36.1    true    1987-11-23    varchar_36    text_36
  1714  37    37.1    false    2008-11-10    varchar_37    text_37
  1715  38    38.1    true    1986-01-29    varchar_38    text_38
  1716  39    39.1    false    1985-02-27    varchar_39    text_39
  1717  40    40.1    true    2016-11-28    varchar_40    text_40
  1718  41    41.1    false    1991-02-11    varchar_41    text_41
  1719  42    42.1    true    2019-01-08    varchar_42    text_42
  1720  43    43.1    false    2009-05-01    varchar_43    text_43
  1721  44    44.1    true    1986-11-15    varchar_44    text_44
  1722  45    45.1    false    2000-07-22    varchar_45    text_45
  1723  46    46.1    true    2002-09-07    varchar_46    text_46
  1724  47    47.1    false    1987-09-23    varchar_47    text_47
  1725  48    48.1    true    1985-10-25    varchar_48    text_48
  1726  49    49.1    false    1988-10-06    varchar_49    text_49
  1727  select * from result_scan(last_query_id()) as u;
  1728  col1    col2    col3    col4    col5    col6
  1729  31    31.1    false    1981-08-07    varchar_31    text_31
  1730  32    32.1    true    1984-03-25    varchar_32    text_32
  1731  33    33.1    false    2001-09-05    varchar_33    text_33
  1732  34    34.1    true    2022-03-17    varchar_34    text_34
  1733  35    35.1    false    2008-06-24    varchar_35    text_35
  1734  36    36.1    true    1987-11-23    varchar_36    text_36
  1735  37    37.1    false    2008-11-10    varchar_37    text_37
  1736  38    38.1    true    1986-01-29    varchar_38    text_38
  1737  39    39.1    false    1985-02-27    varchar_39    text_39
  1738  40    40.1    true    2016-11-28    varchar_40    text_40
  1739  41    41.1    false    1991-02-11    varchar_41    text_41
  1740  42    42.1    true    2019-01-08    varchar_42    text_42
  1741  43    43.1    false    2009-05-01    varchar_43    text_43
  1742  44    44.1    true    1986-11-15    varchar_44    text_44
  1743  45    45.1    false    2000-07-22    varchar_45    text_45
  1744  46    46.1    true    2002-09-07    varchar_46    text_46
  1745  47    47.1    false    1987-09-23    varchar_47    text_47
  1746  48    48.1    true    1985-10-25    varchar_48    text_48
  1747  49    49.1    false    1988-10-06    varchar_49    text_49
  1748  /* save_result */select * from test_table where col1 < 10;
  1749  col1    col2    col3    col4    col5    col6
  1750  0    0.1    true    1982-03-24    varchar_0    text_0
  1751  1    1.1    false    1982-07-31    varchar_1    text_1
  1752  2    2.1    true    2002-04-13    varchar_2    text_2
  1753  3    3.1    false    2019-09-29    varchar_3    text_3
  1754  4    4.1    true    1996-08-20    varchar_4    text_4
  1755  5    5.1    false    2008-10-13    varchar_5    text_5
  1756  6    6.1    true    2002-03-05    varchar_6    text_6
  1757  7    7.1    false    1993-11-07    varchar_7    text_7
  1758  8    8.1    true    1994-01-08    varchar_8    text_8
  1759  9    9.1    false    1999-09-17    varchar_9    text_9
  1760  select * from result_scan(last_query_id()) as u;
  1761  col1    col2    col3    col4    col5    col6
  1762  0    0.1    true    1982-03-24    varchar_0    text_0
  1763  1    1.1    false    1982-07-31    varchar_1    text_1
  1764  2    2.1    true    2002-04-13    varchar_2    text_2
  1765  3    3.1    false    2019-09-29    varchar_3    text_3
  1766  4    4.1    true    1996-08-20    varchar_4    text_4
  1767  5    5.1    false    2008-10-13    varchar_5    text_5
  1768  6    6.1    true    2002-03-05    varchar_6    text_6
  1769  7    7.1    false    1993-11-07    varchar_7    text_7
  1770  8    8.1    true    1994-01-08    varchar_8    text_8
  1771  9    9.1    false    1999-09-17    varchar_9    text_9
  1772  /* save_result */select * from test_table where col1 = 10;
  1773  col1    col2    col3    col4    col5    col6
  1774  10    10.1    true    2003-09-28    varchar_10    text_10
  1775  select * from result_scan(last_query_id()) as u;
  1776  col1    col2    col3    col4    col5    col6
  1777  10    10.1    true    2003-09-28    varchar_10    text_10
  1778  /* save_result */select * from test_table limit 1;
  1779  col1    col2    col3    col4    col5    col6
  1780  0    0.1    true    1982-03-24    varchar_0    text_0
  1781  select * from result_scan(last_query_id()) as u;
  1782  col1    col2    col3    col4    col5    col6
  1783  0    0.1    true    1982-03-24    varchar_0    text_0
  1784  /* save_result */select * from test_table order by col1 asc;
  1785  col1    col2    col3    col4    col5    col6
  1786  0    0.1    true    1982-03-24    varchar_0    text_0
  1787  1    1.1    false    1982-07-31    varchar_1    text_1
  1788  2    2.1    true    2002-04-13    varchar_2    text_2
  1789  3    3.1    false    2019-09-29    varchar_3    text_3
  1790  4    4.1    true    1996-08-20    varchar_4    text_4
  1791  5    5.1    false    2008-10-13    varchar_5    text_5
  1792  6    6.1    true    2002-03-05    varchar_6    text_6
  1793  7    7.1    false    1993-11-07    varchar_7    text_7
  1794  8    8.1    true    1994-01-08    varchar_8    text_8
  1795  9    9.1    false    1999-09-17    varchar_9    text_9
  1796  10    10.1    true    2003-09-28    varchar_10    text_10
  1797  11    11.1    false    1984-01-22    varchar_11    text_11
  1798  12    12.1    true    1994-02-10    varchar_12    text_12
  1799  13    13.1    false    1994-12-02    varchar_13    text_13
  1800  14    14.1    true    2013-01-19    varchar_14    text_14
  1801  15    15.1    false    2002-09-29    varchar_15    text_15
  1802  16    16.1    true    2001-12-07    varchar_16    text_16
  1803  17    17.1    false    1989-03-11    varchar_17    text_17
  1804  18    18.1    true    2019-11-04    varchar_18    text_18
  1805  19    19.1    false    2002-08-15    varchar_19    text_19
  1806  20    20.1    true    1995-12-20    varchar_20    text_20
  1807  21    21.1    false    2018-08-03    varchar_21    text_21
  1808  22    22.1    true    1998-03-10    varchar_22    text_22
  1809  23    23.1    false    2022-04-08    varchar_23    text_23
  1810  24    24.1    true    1989-04-27    varchar_24    text_24
  1811  25    25.1    false    2009-03-14    varchar_25    text_25
  1812  26    26.1    true    2019-03-27    varchar_26    text_26
  1813  27    27.1    false    1983-10-28    varchar_27    text_27
  1814  28    28.1    true    1993-07-19    varchar_28    text_28
  1815  29    29.1    false    1986-09-11    varchar_29    text_29
  1816  30    30.1    true    1992-08-19    varchar_30    text_30
  1817  31    31.1    false    1981-08-07    varchar_31    text_31
  1818  32    32.1    true    1984-03-25    varchar_32    text_32
  1819  33    33.1    false    2001-09-05    varchar_33    text_33
  1820  34    34.1    true    2022-03-17    varchar_34    text_34
  1821  35    35.1    false    2008-06-24    varchar_35    text_35
  1822  36    36.1    true    1987-11-23    varchar_36    text_36
  1823  37    37.1    false    2008-11-10    varchar_37    text_37
  1824  38    38.1    true    1986-01-29    varchar_38    text_38
  1825  39    39.1    false    1985-02-27    varchar_39    text_39
  1826  40    40.1    true    2016-11-28    varchar_40    text_40
  1827  41    41.1    false    1991-02-11    varchar_41    text_41
  1828  42    42.1    true    2019-01-08    varchar_42    text_42
  1829  43    43.1    false    2009-05-01    varchar_43    text_43
  1830  44    44.1    true    1986-11-15    varchar_44    text_44
  1831  45    45.1    false    2000-07-22    varchar_45    text_45
  1832  46    46.1    true    2002-09-07    varchar_46    text_46
  1833  47    47.1    false    1987-09-23    varchar_47    text_47
  1834  48    48.1    true    1985-10-25    varchar_48    text_48
  1835  49    49.1    false    1988-10-06    varchar_49    text_49
  1836  select * from result_scan(last_query_id()) as u;
  1837  col1    col2    col3    col4    col5    col6
  1838  0    0.1    true    1982-03-24    varchar_0    text_0
  1839  1    1.1    false    1982-07-31    varchar_1    text_1
  1840  2    2.1    true    2002-04-13    varchar_2    text_2
  1841  3    3.1    false    2019-09-29    varchar_3    text_3
  1842  4    4.1    true    1996-08-20    varchar_4    text_4
  1843  5    5.1    false    2008-10-13    varchar_5    text_5
  1844  6    6.1    true    2002-03-05    varchar_6    text_6
  1845  7    7.1    false    1993-11-07    varchar_7    text_7
  1846  8    8.1    true    1994-01-08    varchar_8    text_8
  1847  9    9.1    false    1999-09-17    varchar_9    text_9
  1848  10    10.1    true    2003-09-28    varchar_10    text_10
  1849  11    11.1    false    1984-01-22    varchar_11    text_11
  1850  12    12.1    true    1994-02-10    varchar_12    text_12
  1851  13    13.1    false    1994-12-02    varchar_13    text_13
  1852  14    14.1    true    2013-01-19    varchar_14    text_14
  1853  15    15.1    false    2002-09-29    varchar_15    text_15
  1854  16    16.1    true    2001-12-07    varchar_16    text_16
  1855  17    17.1    false    1989-03-11    varchar_17    text_17
  1856  18    18.1    true    2019-11-04    varchar_18    text_18
  1857  19    19.1    false    2002-08-15    varchar_19    text_19
  1858  20    20.1    true    1995-12-20    varchar_20    text_20
  1859  21    21.1    false    2018-08-03    varchar_21    text_21
  1860  22    22.1    true    1998-03-10    varchar_22    text_22
  1861  23    23.1    false    2022-04-08    varchar_23    text_23
  1862  24    24.1    true    1989-04-27    varchar_24    text_24
  1863  25    25.1    false    2009-03-14    varchar_25    text_25
  1864  26    26.1    true    2019-03-27    varchar_26    text_26
  1865  27    27.1    false    1983-10-28    varchar_27    text_27
  1866  28    28.1    true    1993-07-19    varchar_28    text_28
  1867  29    29.1    false    1986-09-11    varchar_29    text_29
  1868  30    30.1    true    1992-08-19    varchar_30    text_30
  1869  31    31.1    false    1981-08-07    varchar_31    text_31
  1870  32    32.1    true    1984-03-25    varchar_32    text_32
  1871  33    33.1    false    2001-09-05    varchar_33    text_33
  1872  34    34.1    true    2022-03-17    varchar_34    text_34
  1873  35    35.1    false    2008-06-24    varchar_35    text_35
  1874  36    36.1    true    1987-11-23    varchar_36    text_36
  1875  37    37.1    false    2008-11-10    varchar_37    text_37
  1876  38    38.1    true    1986-01-29    varchar_38    text_38
  1877  39    39.1    false    1985-02-27    varchar_39    text_39
  1878  40    40.1    true    2016-11-28    varchar_40    text_40
  1879  41    41.1    false    1991-02-11    varchar_41    text_41
  1880  42    42.1    true    2019-01-08    varchar_42    text_42
  1881  43    43.1    false    2009-05-01    varchar_43    text_43
  1882  44    44.1    true    1986-11-15    varchar_44    text_44
  1883  45    45.1    false    2000-07-22    varchar_45    text_45
  1884  46    46.1    true    2002-09-07    varchar_46    text_46
  1885  47    47.1    false    1987-09-23    varchar_47    text_47
  1886  48    48.1    true    1985-10-25    varchar_48    text_48
  1887  49    49.1    false    1988-10-06    varchar_49    text_49
  1888  /* save_result */select t1.col1,t2.col1 from test_table t1  left join test_table t2 on t1.col1=t2.col1;
  1889  col1    col1
  1890  0    0
  1891  1    1
  1892  2    2
  1893  3    3
  1894  4    4
  1895  5    5
  1896  6    6
  1897  7    7
  1898  8    8
  1899  9    9
  1900  10    10
  1901  11    11
  1902  12    12
  1903  13    13
  1904  14    14
  1905  15    15
  1906  16    16
  1907  17    17
  1908  18    18
  1909  19    19
  1910  20    20
  1911  21    21
  1912  22    22
  1913  23    23
  1914  24    24
  1915  25    25
  1916  26    26
  1917  27    27
  1918  28    28
  1919  29    29
  1920  30    30
  1921  31    31
  1922  32    32
  1923  33    33
  1924  34    34
  1925  35    35
  1926  36    36
  1927  37    37
  1928  38    38
  1929  39    39
  1930  40    40
  1931  41    41
  1932  42    42
  1933  43    43
  1934  44    44
  1935  45    45
  1936  46    46
  1937  47    47
  1938  48    48
  1939  49    49
  1940  select * from result_scan(last_query_id()) as u;
  1941  col1_0    col1_1
  1942  0    0
  1943  1    1
  1944  2    2
  1945  3    3
  1946  4    4
  1947  5    5
  1948  6    6
  1949  7    7
  1950  8    8
  1951  9    9
  1952  10    10
  1953  11    11
  1954  12    12
  1955  13    13
  1956  14    14
  1957  15    15
  1958  16    16
  1959  17    17
  1960  18    18
  1961  19    19
  1962  20    20
  1963  21    21
  1964  22    22
  1965  23    23
  1966  24    24
  1967  25    25
  1968  26    26
  1969  27    27
  1970  28    28
  1971  29    29
  1972  30    30
  1973  31    31
  1974  32    32
  1975  33    33
  1976  34    34
  1977  35    35
  1978  36    36
  1979  37    37
  1980  38    38
  1981  39    39
  1982  40    40
  1983  41    41
  1984  42    42
  1985  43    43
  1986  44    44
  1987  45    45
  1988  46    46
  1989  47    47
  1990  48    48
  1991  49    49
  1992  /* save_result */select t1.col1,t2.col1 from test_table t1  right join test_table t2 on t1.col1=t2.col1;
  1993  col1    col1
  1994  0    0
  1995  1    1
  1996  2    2
  1997  3    3
  1998  4    4
  1999  5    5
  2000  6    6
  2001  7    7
  2002  8    8
  2003  9    9
  2004  10    10
  2005  11    11
  2006  12    12
  2007  13    13
  2008  14    14
  2009  15    15
  2010  16    16
  2011  17    17
  2012  18    18
  2013  19    19
  2014  20    20
  2015  21    21
  2016  22    22
  2017  23    23
  2018  24    24
  2019  25    25
  2020  26    26
  2021  27    27
  2022  28    28
  2023  29    29
  2024  30    30
  2025  31    31
  2026  32    32
  2027  33    33
  2028  34    34
  2029  35    35
  2030  36    36
  2031  37    37
  2032  38    38
  2033  39    39
  2034  40    40
  2035  41    41
  2036  42    42
  2037  43    43
  2038  44    44
  2039  45    45
  2040  46    46
  2041  47    47
  2042  48    48
  2043  49    49
  2044  select * from result_scan(last_query_id()) as u;
  2045  col1_0    col1_1
  2046  0    0
  2047  1    1
  2048  2    2
  2049  3    3
  2050  4    4
  2051  5    5
  2052  6    6
  2053  7    7
  2054  8    8
  2055  9    9
  2056  10    10
  2057  11    11
  2058  12    12
  2059  13    13
  2060  14    14
  2061  15    15
  2062  16    16
  2063  17    17
  2064  18    18
  2065  19    19
  2066  20    20
  2067  21    21
  2068  22    22
  2069  23    23
  2070  24    24
  2071  25    25
  2072  26    26
  2073  27    27
  2074  28    28
  2075  29    29
  2076  30    30
  2077  31    31
  2078  32    32
  2079  33    33
  2080  34    34
  2081  35    35
  2082  36    36
  2083  37    37
  2084  38    38
  2085  39    39
  2086  40    40
  2087  41    41
  2088  42    42
  2089  43    43
  2090  44    44
  2091  45    45
  2092  46    46
  2093  47    47
  2094  48    48
  2095  49    49
  2096  /* save_result */select * from test_table union select * from test_table;
  2097  col1    col2    col3    col4    col5    col6
  2098  0    0.1    true    1982-03-24    varchar_0    text_0
  2099  1    1.1    false    1982-07-31    varchar_1    text_1
  2100  2    2.1    true    2002-04-13    varchar_2    text_2
  2101  3    3.1    false    2019-09-29    varchar_3    text_3
  2102  4    4.1    true    1996-08-20    varchar_4    text_4
  2103  5    5.1    false    2008-10-13    varchar_5    text_5
  2104  6    6.1    true    2002-03-05    varchar_6    text_6
  2105  7    7.1    false    1993-11-07    varchar_7    text_7
  2106  8    8.1    true    1994-01-08    varchar_8    text_8
  2107  9    9.1    false    1999-09-17    varchar_9    text_9
  2108  10    10.1    true    2003-09-28    varchar_10    text_10
  2109  11    11.1    false    1984-01-22    varchar_11    text_11
  2110  12    12.1    true    1994-02-10    varchar_12    text_12
  2111  13    13.1    false    1994-12-02    varchar_13    text_13
  2112  14    14.1    true    2013-01-19    varchar_14    text_14
  2113  15    15.1    false    2002-09-29    varchar_15    text_15
  2114  16    16.1    true    2001-12-07    varchar_16    text_16
  2115  17    17.1    false    1989-03-11    varchar_17    text_17
  2116  18    18.1    true    2019-11-04    varchar_18    text_18
  2117  19    19.1    false    2002-08-15    varchar_19    text_19
  2118  20    20.1    true    1995-12-20    varchar_20    text_20
  2119  21    21.1    false    2018-08-03    varchar_21    text_21
  2120  22    22.1    true    1998-03-10    varchar_22    text_22
  2121  23    23.1    false    2022-04-08    varchar_23    text_23
  2122  24    24.1    true    1989-04-27    varchar_24    text_24
  2123  25    25.1    false    2009-03-14    varchar_25    text_25
  2124  26    26.1    true    2019-03-27    varchar_26    text_26
  2125  27    27.1    false    1983-10-28    varchar_27    text_27
  2126  28    28.1    true    1993-07-19    varchar_28    text_28
  2127  29    29.1    false    1986-09-11    varchar_29    text_29
  2128  30    30.1    true    1992-08-19    varchar_30    text_30
  2129  31    31.1    false    1981-08-07    varchar_31    text_31
  2130  32    32.1    true    1984-03-25    varchar_32    text_32
  2131  33    33.1    false    2001-09-05    varchar_33    text_33
  2132  34    34.1    true    2022-03-17    varchar_34    text_34
  2133  35    35.1    false    2008-06-24    varchar_35    text_35
  2134  36    36.1    true    1987-11-23    varchar_36    text_36
  2135  37    37.1    false    2008-11-10    varchar_37    text_37
  2136  38    38.1    true    1986-01-29    varchar_38    text_38
  2137  39    39.1    false    1985-02-27    varchar_39    text_39
  2138  40    40.1    true    2016-11-28    varchar_40    text_40
  2139  41    41.1    false    1991-02-11    varchar_41    text_41
  2140  42    42.1    true    2019-01-08    varchar_42    text_42
  2141  43    43.1    false    2009-05-01    varchar_43    text_43
  2142  44    44.1    true    1986-11-15    varchar_44    text_44
  2143  45    45.1    false    2000-07-22    varchar_45    text_45
  2144  46    46.1    true    2002-09-07    varchar_46    text_46
  2145  47    47.1    false    1987-09-23    varchar_47    text_47
  2146  48    48.1    true    1985-10-25    varchar_48    text_48
  2147  49    49.1    false    1988-10-06    varchar_49    text_49
  2148  select * from result_scan(last_query_id()) as u;
  2149  col1    col2    col3    col4    col5    col6
  2150  0    0.1    true    1982-03-24    varchar_0    text_0
  2151  1    1.1    false    1982-07-31    varchar_1    text_1
  2152  2    2.1    true    2002-04-13    varchar_2    text_2
  2153  3    3.1    false    2019-09-29    varchar_3    text_3
  2154  4    4.1    true    1996-08-20    varchar_4    text_4
  2155  5    5.1    false    2008-10-13    varchar_5    text_5
  2156  6    6.1    true    2002-03-05    varchar_6    text_6
  2157  7    7.1    false    1993-11-07    varchar_7    text_7
  2158  8    8.1    true    1994-01-08    varchar_8    text_8
  2159  9    9.1    false    1999-09-17    varchar_9    text_9
  2160  10    10.1    true    2003-09-28    varchar_10    text_10
  2161  11    11.1    false    1984-01-22    varchar_11    text_11
  2162  12    12.1    true    1994-02-10    varchar_12    text_12
  2163  13    13.1    false    1994-12-02    varchar_13    text_13
  2164  14    14.1    true    2013-01-19    varchar_14    text_14
  2165  15    15.1    false    2002-09-29    varchar_15    text_15
  2166  16    16.1    true    2001-12-07    varchar_16    text_16
  2167  17    17.1    false    1989-03-11    varchar_17    text_17
  2168  18    18.1    true    2019-11-04    varchar_18    text_18
  2169  19    19.1    false    2002-08-15    varchar_19    text_19
  2170  20    20.1    true    1995-12-20    varchar_20    text_20
  2171  21    21.1    false    2018-08-03    varchar_21    text_21
  2172  22    22.1    true    1998-03-10    varchar_22    text_22
  2173  23    23.1    false    2022-04-08    varchar_23    text_23
  2174  24    24.1    true    1989-04-27    varchar_24    text_24
  2175  25    25.1    false    2009-03-14    varchar_25    text_25
  2176  26    26.1    true    2019-03-27    varchar_26    text_26
  2177  27    27.1    false    1983-10-28    varchar_27    text_27
  2178  28    28.1    true    1993-07-19    varchar_28    text_28
  2179  29    29.1    false    1986-09-11    varchar_29    text_29
  2180  30    30.1    true    1992-08-19    varchar_30    text_30
  2181  31    31.1    false    1981-08-07    varchar_31    text_31
  2182  32    32.1    true    1984-03-25    varchar_32    text_32
  2183  33    33.1    false    2001-09-05    varchar_33    text_33
  2184  34    34.1    true    2022-03-17    varchar_34    text_34
  2185  35    35.1    false    2008-06-24    varchar_35    text_35
  2186  36    36.1    true    1987-11-23    varchar_36    text_36
  2187  37    37.1    false    2008-11-10    varchar_37    text_37
  2188  38    38.1    true    1986-01-29    varchar_38    text_38
  2189  39    39.1    false    1985-02-27    varchar_39    text_39
  2190  40    40.1    true    2016-11-28    varchar_40    text_40
  2191  41    41.1    false    1991-02-11    varchar_41    text_41
  2192  42    42.1    true    2019-01-08    varchar_42    text_42
  2193  43    43.1    false    2009-05-01    varchar_43    text_43
  2194  44    44.1    true    1986-11-15    varchar_44    text_44
  2195  45    45.1    false    2000-07-22    varchar_45    text_45
  2196  46    46.1    true    2002-09-07    varchar_46    text_46
  2197  47    47.1    false    1987-09-23    varchar_47    text_47
  2198  48    48.1    true    1985-10-25    varchar_48    text_48
  2199  49    49.1    false    1988-10-06    varchar_49    text_49
  2200  /* save_result */SELECT col1 FROM test_view where col1 < 30 MINUS SELECT col1  FROM test_view where col1 < 20;
  2201  col1
  2202  20
  2203  21
  2204  22
  2205  23
  2206  24
  2207  25
  2208  26
  2209  27
  2210  28
  2211  29
  2212  select * from result_scan(last_query_id()) as u;
  2213  col1
  2214  20
  2215  21
  2216  22
  2217  23
  2218  24
  2219  25
  2220  26
  2221  27
  2222  28
  2223  29
  2224  rollback;
  2225  begin;
  2226  /* save_result */select * from test_table;
  2227  col1    col2    col3    col4    col5    col6
  2228  0    0.1    true    1982-03-24    varchar_0    text_0
  2229  1    1.1    false    1982-07-31    varchar_1    text_1
  2230  2    2.1    true    2002-04-13    varchar_2    text_2
  2231  3    3.1    false    2019-09-29    varchar_3    text_3
  2232  4    4.1    true    1996-08-20    varchar_4    text_4
  2233  5    5.1    false    2008-10-13    varchar_5    text_5
  2234  6    6.1    true    2002-03-05    varchar_6    text_6
  2235  7    7.1    false    1993-11-07    varchar_7    text_7
  2236  8    8.1    true    1994-01-08    varchar_8    text_8
  2237  9    9.1    false    1999-09-17    varchar_9    text_9
  2238  10    10.1    true    2003-09-28    varchar_10    text_10
  2239  11    11.1    false    1984-01-22    varchar_11    text_11
  2240  12    12.1    true    1994-02-10    varchar_12    text_12
  2241  13    13.1    false    1994-12-02    varchar_13    text_13
  2242  14    14.1    true    2013-01-19    varchar_14    text_14
  2243  15    15.1    false    2002-09-29    varchar_15    text_15
  2244  16    16.1    true    2001-12-07    varchar_16    text_16
  2245  17    17.1    false    1989-03-11    varchar_17    text_17
  2246  18    18.1    true    2019-11-04    varchar_18    text_18
  2247  19    19.1    false    2002-08-15    varchar_19    text_19
  2248  20    20.1    true    1995-12-20    varchar_20    text_20
  2249  21    21.1    false    2018-08-03    varchar_21    text_21
  2250  22    22.1    true    1998-03-10    varchar_22    text_22
  2251  23    23.1    false    2022-04-08    varchar_23    text_23
  2252  24    24.1    true    1989-04-27    varchar_24    text_24
  2253  25    25.1    false    2009-03-14    varchar_25    text_25
  2254  26    26.1    true    2019-03-27    varchar_26    text_26
  2255  27    27.1    false    1983-10-28    varchar_27    text_27
  2256  28    28.1    true    1993-07-19    varchar_28    text_28
  2257  29    29.1    false    1986-09-11    varchar_29    text_29
  2258  30    30.1    true    1992-08-19    varchar_30    text_30
  2259  31    31.1    false    1981-08-07    varchar_31    text_31
  2260  32    32.1    true    1984-03-25    varchar_32    text_32
  2261  33    33.1    false    2001-09-05    varchar_33    text_33
  2262  34    34.1    true    2022-03-17    varchar_34    text_34
  2263  35    35.1    false    2008-06-24    varchar_35    text_35
  2264  36    36.1    true    1987-11-23    varchar_36    text_36
  2265  37    37.1    false    2008-11-10    varchar_37    text_37
  2266  38    38.1    true    1986-01-29    varchar_38    text_38
  2267  39    39.1    false    1985-02-27    varchar_39    text_39
  2268  40    40.1    true    2016-11-28    varchar_40    text_40
  2269  41    41.1    false    1991-02-11    varchar_41    text_41
  2270  42    42.1    true    2019-01-08    varchar_42    text_42
  2271  43    43.1    false    2009-05-01    varchar_43    text_43
  2272  44    44.1    true    1986-11-15    varchar_44    text_44
  2273  45    45.1    false    2000-07-22    varchar_45    text_45
  2274  46    46.1    true    2002-09-07    varchar_46    text_46
  2275  47    47.1    false    1987-09-23    varchar_47    text_47
  2276  48    48.1    true    1985-10-25    varchar_48    text_48
  2277  49    49.1    false    1988-10-06    varchar_49    text_49
  2278  rollback;
  2279  select * from result_scan(last_query_id(-2)) as u;
  2280  col1    col2    col3    col4    col5    col6
  2281  0    0.1    true    1982-03-24    varchar_0    text_0
  2282  1    1.1    false    1982-07-31    varchar_1    text_1
  2283  2    2.1    true    2002-04-13    varchar_2    text_2
  2284  3    3.1    false    2019-09-29    varchar_3    text_3
  2285  4    4.1    true    1996-08-20    varchar_4    text_4
  2286  5    5.1    false    2008-10-13    varchar_5    text_5
  2287  6    6.1    true    2002-03-05    varchar_6    text_6
  2288  7    7.1    false    1993-11-07    varchar_7    text_7
  2289  8    8.1    true    1994-01-08    varchar_8    text_8
  2290  9    9.1    false    1999-09-17    varchar_9    text_9
  2291  10    10.1    true    2003-09-28    varchar_10    text_10
  2292  11    11.1    false    1984-01-22    varchar_11    text_11
  2293  12    12.1    true    1994-02-10    varchar_12    text_12
  2294  13    13.1    false    1994-12-02    varchar_13    text_13
  2295  14    14.1    true    2013-01-19    varchar_14    text_14
  2296  15    15.1    false    2002-09-29    varchar_15    text_15
  2297  16    16.1    true    2001-12-07    varchar_16    text_16
  2298  17    17.1    false    1989-03-11    varchar_17    text_17
  2299  18    18.1    true    2019-11-04    varchar_18    text_18
  2300  19    19.1    false    2002-08-15    varchar_19    text_19
  2301  20    20.1    true    1995-12-20    varchar_20    text_20
  2302  21    21.1    false    2018-08-03    varchar_21    text_21
  2303  22    22.1    true    1998-03-10    varchar_22    text_22
  2304  23    23.1    false    2022-04-08    varchar_23    text_23
  2305  24    24.1    true    1989-04-27    varchar_24    text_24
  2306  25    25.1    false    2009-03-14    varchar_25    text_25
  2307  26    26.1    true    2019-03-27    varchar_26    text_26
  2308  27    27.1    false    1983-10-28    varchar_27    text_27
  2309  28    28.1    true    1993-07-19    varchar_28    text_28
  2310  29    29.1    false    1986-09-11    varchar_29    text_29
  2311  30    30.1    true    1992-08-19    varchar_30    text_30
  2312  31    31.1    false    1981-08-07    varchar_31    text_31
  2313  32    32.1    true    1984-03-25    varchar_32    text_32
  2314  33    33.1    false    2001-09-05    varchar_33    text_33
  2315  34    34.1    true    2022-03-17    varchar_34    text_34
  2316  35    35.1    false    2008-06-24    varchar_35    text_35
  2317  36    36.1    true    1987-11-23    varchar_36    text_36
  2318  37    37.1    false    2008-11-10    varchar_37    text_37
  2319  38    38.1    true    1986-01-29    varchar_38    text_38
  2320  39    39.1    false    1985-02-27    varchar_39    text_39
  2321  40    40.1    true    2016-11-28    varchar_40    text_40
  2322  41    41.1    false    1991-02-11    varchar_41    text_41
  2323  42    42.1    true    2019-01-08    varchar_42    text_42
  2324  43    43.1    false    2009-05-01    varchar_43    text_43
  2325  44    44.1    true    1986-11-15    varchar_44    text_44
  2326  45    45.1    false    2000-07-22    varchar_45    text_45
  2327  46    46.1    true    2002-09-07    varchar_46    text_46
  2328  47    47.1    false    1987-09-23    varchar_47    text_47
  2329  48    48.1    true    1985-10-25    varchar_48    text_48
  2330  49    49.1    false    1988-10-06    varchar_49    text_49
  2331  set @xxx=10;
  2332  prepare s1 from select * from test_table where col1<?;
  2333  execute s1 using @xxx;
  2334  col1    col2    col3    col4    col5    col6
  2335  0    0.1    true    1982-03-24    varchar_0    text_0
  2336  1    1.1    false    1982-07-31    varchar_1    text_1
  2337  2    2.1    true    2002-04-13    varchar_2    text_2
  2338  3    3.1    false    2019-09-29    varchar_3    text_3
  2339  4    4.1    true    1996-08-20    varchar_4    text_4
  2340  5    5.1    false    2008-10-13    varchar_5    text_5
  2341  6    6.1    true    2002-03-05    varchar_6    text_6
  2342  7    7.1    false    1993-11-07    varchar_7    text_7
  2343  8    8.1    true    1994-01-08    varchar_8    text_8
  2344  9    9.1    false    1999-09-17    varchar_9    text_9
  2345  select * from result_scan(last_query_id(-1)) as u;
  2346  col1    col2    col3    col4    col5    col6
  2347  0    0.1    true    1982-03-24    varchar_0    text_0
  2348  1    1.1    false    1982-07-31    varchar_1    text_1
  2349  2    2.1    true    2002-04-13    varchar_2    text_2
  2350  3    3.1    false    2019-09-29    varchar_3    text_3
  2351  4    4.1    true    1996-08-20    varchar_4    text_4
  2352  5    5.1    false    2008-10-13    varchar_5    text_5
  2353  6    6.1    true    2002-03-05    varchar_6    text_6
  2354  7    7.1    false    1993-11-07    varchar_7    text_7
  2355  8    8.1    true    1994-01-08    varchar_8    text_8
  2356  9    9.1    false    1999-09-17    varchar_9    text_9
  2357  deallocate prepare s1;
  2358  set global save_query_result = off;
  2359  /* save_result */select * from test_table;
  2360  col1    col2    col3    col4    col5    col6
  2361  0    0.1    true    1982-03-24    varchar_0    text_0
  2362  1    1.1    false    1982-07-31    varchar_1    text_1
  2363  2    2.1    true    2002-04-13    varchar_2    text_2
  2364  3    3.1    false    2019-09-29    varchar_3    text_3
  2365  4    4.1    true    1996-08-20    varchar_4    text_4
  2366  5    5.1    false    2008-10-13    varchar_5    text_5
  2367  6    6.1    true    2002-03-05    varchar_6    text_6
  2368  7    7.1    false    1993-11-07    varchar_7    text_7
  2369  8    8.1    true    1994-01-08    varchar_8    text_8
  2370  9    9.1    false    1999-09-17    varchar_9    text_9
  2371  10    10.1    true    2003-09-28    varchar_10    text_10
  2372  11    11.1    false    1984-01-22    varchar_11    text_11
  2373  12    12.1    true    1994-02-10    varchar_12    text_12
  2374  13    13.1    false    1994-12-02    varchar_13    text_13
  2375  14    14.1    true    2013-01-19    varchar_14    text_14
  2376  15    15.1    false    2002-09-29    varchar_15    text_15
  2377  16    16.1    true    2001-12-07    varchar_16    text_16
  2378  17    17.1    false    1989-03-11    varchar_17    text_17
  2379  18    18.1    true    2019-11-04    varchar_18    text_18
  2380  19    19.1    false    2002-08-15    varchar_19    text_19
  2381  20    20.1    true    1995-12-20    varchar_20    text_20
  2382  21    21.1    false    2018-08-03    varchar_21    text_21
  2383  22    22.1    true    1998-03-10    varchar_22    text_22
  2384  23    23.1    false    2022-04-08    varchar_23    text_23
  2385  24    24.1    true    1989-04-27    varchar_24    text_24
  2386  25    25.1    false    2009-03-14    varchar_25    text_25
  2387  26    26.1    true    2019-03-27    varchar_26    text_26
  2388  27    27.1    false    1983-10-28    varchar_27    text_27
  2389  28    28.1    true    1993-07-19    varchar_28    text_28
  2390  29    29.1    false    1986-09-11    varchar_29    text_29
  2391  30    30.1    true    1992-08-19    varchar_30    text_30
  2392  31    31.1    false    1981-08-07    varchar_31    text_31
  2393  32    32.1    true    1984-03-25    varchar_32    text_32
  2394  33    33.1    false    2001-09-05    varchar_33    text_33
  2395  34    34.1    true    2022-03-17    varchar_34    text_34
  2396  35    35.1    false    2008-06-24    varchar_35    text_35
  2397  36    36.1    true    1987-11-23    varchar_36    text_36
  2398  37    37.1    false    2008-11-10    varchar_37    text_37
  2399  38    38.1    true    1986-01-29    varchar_38    text_38
  2400  39    39.1    false    1985-02-27    varchar_39    text_39
  2401  40    40.1    true    2016-11-28    varchar_40    text_40
  2402  41    41.1    false    1991-02-11    varchar_41    text_41
  2403  42    42.1    true    2019-01-08    varchar_42    text_42
  2404  43    43.1    false    2009-05-01    varchar_43    text_43
  2405  44    44.1    true    1986-11-15    varchar_44    text_44
  2406  45    45.1    false    2000-07-22    varchar_45    text_45
  2407  46    46.1    true    2002-09-07    varchar_46    text_46
  2408  47    47.1    false    1987-09-23    varchar_47    text_47
  2409  48    48.1    true    1985-10-25    varchar_48    text_48
  2410  49    49.1    false    1988-10-06    varchar_49    text_49
  2411  select * from result_scan(last_query_id()) as u;
  2412  no configure: save query result
  2413  set global save_query_result = on;
  2414  set global save_query_result = off;
  2415  set global save_query_result = on;
  2416  drop table if exists t1;
  2417  create table t1(a int);
  2418  show columns from t1;
  2419  Field    Type    Null    Key    Default    Extra    Comment
  2420  a    INT(32)    YES        null        
  2421  select * from result_scan(last_query_id()) as t;
  2422  Field    Type    Null    Key    Default    Extra    Comment
  2423  a    INT(32)    YES        null        
  2424  set global save_query_result = off;