Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4201 LevelDB Storage Engine MS2
  3. MDEV-4337

LevelDB: Inconsistent results comparing a char field with an int field

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      MySQL [test]> create table t1 (c char(1), i int, primary key(c), key(i)) engine=LevelDB;
      Query OK, 0 rows affected (0.15 sec)
       
      MySQL [test]> insert into t1 values ('2',2),('6',6);
      Query OK, 2 rows affected (0.01 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MySQL [test]> explain extended
          -> select * from t1 where c = i;
      +----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
      | id | select_type | table | type  | possible_keys | key  | key_len | ref  | rows | filtered | Extra                    |
      +----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
      |  1 | SIMPLE      | t1    | index | NULL          | i    | 5       | NULL | 1000 |   100.00 | Using where; Using index |
      +----+-------------+-------+-------+---------------+------+---------+------+------+----------+--------------------------+
      1 row in set, 1 warning (0.00 sec)
       
      MySQL [test]> 
      MySQL [test]> select * from t1 where c = i;
      +---+------+
      | c | i    |
      +---+------+
      | 6 |    6 |
      +---+------+
      1 row in set (0.00 sec)

      Test case:

      drop table if exists t1;
      create table t1 (c char(1), i int, primary key(c), key(i)) engine=LevelDB;
      insert into t1 values ('2',2),('6',6);
      select * from t1 where c = i;

      revision-id: psergey@askmonty.org-20130327131855-qxesm69dxnr3kcgy
      revno: 4818
      branch-nick: mysql-5.6-leveldb

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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