Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3841 LevelDB storage engine
  3. MDEV-4084

LevelDB: Wrong result on IN subquery with index lookup

    XMLWordPrintable

Details

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

    Description

      CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=LevelDB;
      INSERT INTO t1 VALUES (1,10),(2,20);
       
      EXPLAIN EXTENDED
      SELECT 3 IN ( SELECT a FROM t1 );
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
      1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
      2	DEPENDENT SUBQUERY	t1	index_subquery	a	a	5	const	20	100.00	Using index
      Warnings:
      Note	1003	/* select#1 */ select <in_optimizer>(3,<exists>(<index_lookup>(<cache>(3) in t1 on a checking NULL having <is_not_null_test>(`test`.`t1`.`a`)))) AS `3 IN ( SELECT a FROM t1 )`
       
      SELECT 3 IN ( SELECT a FROM t1 );
      3 IN ( SELECT a FROM t1 )
      1

      Test case:

      CREATE TABLE t1 (pk INT PRIMARY KEY, a INT, KEY(a)) ENGINE=LevelDB;
      INSERT INTO t1 VALUES (1,10),(2,20);
       
      SELECT 3 IN ( SELECT a FROM t1 );

      revision-id: psergey@askmonty.org-20130124165745-nm4yaxrsu8e4o2ll
      revno: 4511
      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.