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

weird result with myisam, group_concat and bit column

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.0.22, 5.5, 10.0, 10.1, 10.2, 10.3
    • 10.1
    • None
    • openSUSE linux

    Description

      A colleague noted weird results for a certain SELECT involving

      • a bit() column
      • an unrelated int ID column
      • group_concat on the ID column with additional value being the bit
      • and myISAM

      Test case:

      create database if not exists kicker;
      use kicker;
      drop table if exists test;
      create table test (
      	id int(10) unsigned not null,
      	val bit(1) not null,
      	primary key (id)
      ) ENGINE=MyISAM;
      insert into test set id = 1, val = 0;
      insert into test set id = 2, val = 1;
      select * from test;
      select id, val FROM kicker.test group by id;
      select GROUP_CONCAT(id), not not val FROM kicker.test group by id;
      SELECT GROUP_CONCAT(id), val FROM kicker.test GROUP BY id;
      SELECT GROUP_CONCAT(id, val), val FROM kicker.test GROUP BY id;
      

      The first three selects are OKAY. The last two... show val as bit value 1 for in BOTH result rows.

      The last select even shows the correct bit values 0 and 1 respectively in the GROUP_CONCATted colum, but again both rows have val as bit value 1.

      The results are correct when I replace ENGINE=MyISAM with InnoDB.

      This happens on mariadb 5.5.28 and 10.0.22, both as packaged by openSUSE (11.4 and tumbleweed, respectively)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bof Patrick Schaaf
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.