Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29337

CONNECT BIN unsigned fails on DISTRIB=sorted

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.8.4, 10.9.2, 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
    • 10.5, 10.6
    • None

    Description

      create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
      also fails on optimize table as well.:

      create table tm (
       time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
       data INT4 unsigned not null DEFAULT 0 field_format='X'
      ) engine=CONNECT table_type=BIN block_size=128  file_name='tm.dat';
      

      then INSERT 1000 rows,

      MariaDB [test]> select * from tm limit 10;
       
      | time       | data    |
       
      | 1651378127 | 7447060 |
      | 1651378187 | 6197231 |
      | 1651378288 | 9090561 |
      | 1651378390 | 9525601 |
      | 1651378451 | 4827450 |
      | 1651378511 | 4905942 |
      | 1651378579 | 5260349 |
      

      no tm.bop file shows up:

      -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
      -rw-rw---- 1 mysql mysql  565 Aug 19 14:31 tm.frm
      

      Optimize fails as well:

      MariaDB [test]> optimize table tm;
       
      | Table   | Op       | Msg_type | Msg_text                                      |
       
      | test.tm | optimize | Error    | Non matching Value types                      |
      | test.tm | optimize | error    | Unknown - internal error 122 during operation |
       
      2 rows in set (0.000 sec)
      

      Recreate table with signed

      drop table tm;
      create table tm (
       time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
       data INT4 unsigned not null DEFAULT 0 field_format='X'
      ) engine=CONNECT table_type=BIN block_size=128  file_name='tm.dat';

      update tm set time=time-1 limit 1;
      update tm set time=time+1 limit 1

      Now we have tm.bop file:

      -rw-rw---- 1 mysql mysql   80 Aug 19 14:33 tm.bop
      -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
      -rw-rw---- 1 mysql mysql  565 Aug 19 14:33 tm.frm
      

      And also optimize works

      MariaDB [test]> optimize table tm;
       
      | Table   | Op       | Msg_type | Msg_text |
       
      | test.tm | optimize | status   | OK       |
       
      1 row in set (0.000 sec)
      

      So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted

      Attachments

        Activity

          catam catam created issue -
          catam catam made changes -
          Field Original Value New Value
          Component/s Storage Engine - Connect [ 10128 ]
          catam catam made changes -
          Description create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {quote}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {quote}
          INSERT 1000 rows,
          MariaDB [test]> select * from tm limit 10;
          +------------+---------+
          | time | data |
          +------------+---------+
          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |

          no tm.bop file shows up:
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm

          Optimize fails as well:
          MariaDB [test]> optimize table tm;
          +---------+----------+----------+-----------------------------------------------+
          | Table | Op | Msg_type | Msg_text |
          +---------+----------+----------+-----------------------------------------------+
          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |
          +---------+----------+----------+-----------------------------------------------+
          2 rows in set (0.000 sec)


          then recreate table with signed
          {quote}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';

          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{quote}

          Now we have tm.bop file:
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm

          And also optimize works
          MariaDB [test]> optimize table tm;
          +---------+----------+----------+----------+
          | Table | Op | Msg_type | Msg_text |
          +---------+----------+----------+----------+
          | test.tm | optimize | status | OK |
          +---------+----------+----------+----------+
          1 row in set (0.000 sec)


          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {quote}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {quote}
          then INSERT 1000 rows,
          MariaDB [test]> select * from tm limit 10;

          | time | data |

          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |

          no tm.bop file shows up:
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm

          Optimize fails as well:
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |

          2 rows in set (0.000 sec)

          Recreate table with signed
          {quote}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';

          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{quote}

          Now we have tm.bop file:
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm

          And also optimize works
          MariaDB [test]> optimize table tm;
          +---------+----------+----------+----------+
          | Table | Op | Msg_type | Msg_text |
          +---------+----------+----------+----------+
          | test.tm | optimize | status | OK |
          +---------+----------+----------+----------+
          1 row in set (0.000 sec)


          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          catam catam made changes -
          Description create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {quote}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {quote}
          then INSERT 1000 rows,
          MariaDB [test]> select * from tm limit 10;

          | time | data |

          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |

          no tm.bop file shows up:
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm

          Optimize fails as well:
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |

          2 rows in set (0.000 sec)

          Recreate table with signed
          {quote}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';

          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{quote}

          Now we have tm.bop file:
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm

          And also optimize works
          MariaDB [test]> optimize table tm;
          +---------+----------+----------+----------+
          | Table | Op | Msg_type | Msg_text |
          +---------+----------+----------+----------+
          | test.tm | optimize | status | OK |
          +---------+----------+----------+----------+
          1 row in set (0.000 sec)


          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {quote}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {quote}
          then INSERT 1000 rows,
          MariaDB [test]> select * from tm limit 10;

          | time | data |

          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |

          no tm.bop file shows up:
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm

          Optimize fails as well:
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |

          2 rows in set (0.000 sec)

          Recreate table with signed
          {quote}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';

          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{quote}

          Now we have tm.bop file:
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm

          And also optimize works
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | status | OK |

          1 row in set (0.000 sec)


          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          alice Alice Sherepa made changes -
          Affects Version/s 10.3 [ 22126 ]
          Affects Version/s 10.4 [ 22408 ]
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.6 [ 24028 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          alice Alice Sherepa made changes -
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          alice Alice Sherepa made changes -
          Assignee Anel Husakovic [ anel ]
          serg Sergei Golubchik made changes -
          Description create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {quote}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {quote}
          then INSERT 1000 rows,
          MariaDB [test]> select * from tm limit 10;

          | time | data |

          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |

          no tm.bop file shows up:
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm

          Optimize fails as well:
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |

          2 rows in set (0.000 sec)

          Recreate table with signed
          {quote}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';

          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{quote}

          Now we have tm.bop file:
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm

          And also optimize works
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | status | OK |

          1 row in set (0.000 sec)


          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          create a CONNECT BIN table with a unsigned field is not creating the .bop block_index file,
          also fails on optimize table as well.:

          {code:sql}create table tm (
           time INT4 unsigned not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';
          {code}
          then INSERT 1000 rows,
          {noformat}
          MariaDB [test]> select * from tm limit 10;

          | time | data |

          | 1651378127 | 7447060 |
          | 1651378187 | 6197231 |
          | 1651378288 | 9090561 |
          | 1651378390 | 9525601 |
          | 1651378451 | 4827450 |
          | 1651378511 | 4905942 |
          | 1651378579 | 5260349 |
          {noformat}
          no tm.bop file shows up:
          {noformat}
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:31 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:31 tm.frm
          {noformat}
          Optimize fails as well:
          {noformat}
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | Error | Non matching Value types |
          | test.tm | optimize | error | Unknown - internal error 122 during operation |

          2 rows in set (0.000 sec)
          {noformat}
          Recreate table with signed
          {code:sql}drop table tm;
          create table tm (
           time INT4 not null DEFAULT 0 field_format='X' DISTRIB=sorted,
           data INT4 unsigned not null DEFAULT 0 field_format='X'
          ) engine=CONNECT table_type=BIN block_size=128 file_name='tm.dat';{code}
          {noformat}
          update tm set time=time-1 limit 1;
          update tm set time=time+1 limit 1{noformat}

          Now we have tm.bop file:
          {noformat}
          -rw-rw---- 1 mysql mysql 80 Aug 19 14:33 tm.bop
          -rw-rw---- 1 mysql mysql 8000 Aug 19 14:33 tm.dat
          -rw-rw---- 1 mysql mysql 565 Aug 19 14:33 tm.frm
          {noformat}
          And also optimize works
          {noformat}
          MariaDB [test]> optimize table tm;

          | Table | Op | Msg_type | Msg_text |

          | test.tm | optimize | status | OK |

          1 row in set (0.000 sec)
          {noformat}

          So there seems to be an issue with unsigned types (I tried short as well) and this DISTRIB sorted
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.7 [ 24805 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.3 [ 22126 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.8 [ 26121 ]
          anel Anel Husakovic made changes -
          Assignee Anel Husakovic [ anel ] Andrew Hutchings [ JIRAUSER52179 ]
          julien.fritsch Julien Fritsch made changes -
          Fix Version/s 10.4 [ 22408 ]
          danblack Daniel Black made changes -
          Assignee Andrew Hutchings [ JIRAUSER52179 ]

          People

            Unassigned Unassigned
            catam catam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.