<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="1007647">
  <date_last_updated>2012-07-23 18:41:22.372520+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/1007647</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~elenst</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.3</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/1007647/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/1007647/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/1007647</bug_web_link>
  <owner>Elena Stepanova</owner>
  <assignee>Oleksandr &quot;Sanja&quot; Byelkin</assignee>
  <milestone_title>Maria 5.3</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List&lt;Item&gt;&amp;, List&lt;Item&gt;&amp;, bool)</title>
  <status>In Progress</status>
  <importance>High</importance>
  <created>2012-06-01 23:02:20.761586+00:00</created>
  <description>
<![CDATA[See also bug #1007622 (similar test case, might be the same problem) 

Version: '5.3.8-MariaDB-debug-log' 
mysqld: sql_base.cc:8694: bool fill_record(THD*, List<Item>&, List<Item>&, bool): Assertion `vcol_table == 0 || vcol_table == table' failed.

#8  0xb74fa014 in __assert_fail () from /lib/libc.so.6
#9  0x0833fded in fill_record (thd=0x93ee740, fields=..., values=..., 
    ignore_errors=false) at sql_base.cc:8694
#10 0x0833ff38 in fill_record_n_invoke_before_triggers (thd=0x93ee740, fields=..., 
    values=..., ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT)
    at sql_base.cc:8745
#11 0x0838b6be in mysql_insert (thd=0x93ee740, table_list=0x948d778, fields=..., 
    values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, 
    ignore=false) at sql_insert.cc:808
#12 0x082e66b6 in mysql_execute_command (thd=0x93ee740) at sql_parse.cc:3233
#13 0x082eef92 in mysql_parse (thd=0x93ee740, 
    rawbuf=0x948d6b8 "INSERT INTO v2 (f1, f2) VALUES (1, 2)", length=37, 
    found_semicolon=0xae973234) at sql_parse.cc:6153
#14 0x082e1955 in dispatch_command (command=COM_QUERY, thd=0x93ee740, 
    packet=0x9446331 "INSERT INTO v2 (f1, f2) VALUES (1, 2)", packet_length=37)
    at sql_parse.cc:1228
#15 0x082e0dff in do_command (thd=0x93ee740) at sql_parse.cc:923
#16 0x082ddcf5 in handle_one_connection (arg=0x93ee740) at sql_connect.cc:1218
#17 0xb7788b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-06-01 14:56:47 +0200
revno: 3536

Also reproducible on maria-5.5 revno 3425.
Could not reproduce on maria-5.2, mysql-5.5, mysql-trunk.
Reproducible with default optimizer_switch as well as with all OFF values.
Reproducible with MyISAM, Aria, InnoDB.

Test case:

CREATE TABLE t1 (f1 INT, f2 INT);
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.f1, a2.f2 FROM t1 AS a1, t1 AS a2;
CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1;
INSERT INTO v2 (f1, f2) VALUES (1, 2);

# End of test case

# End of test case]]>  </description>
  <activities>
    <activity datechanged="2012-06-01T23:02:20.761586+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Elena Stepanova</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2012-06-01T23:02:48.027555+00:00">
      <oldvalue>
<![CDATA[Assertion `vcol_table == 0 || vcol_table == table' failed infill_record(THD*, List<Item>&, List<Item>&, bool) ]]>      </oldvalue>
      <newvalue>
<![CDATA[Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool)]]>      </newvalue>
      <whatchanged>summary</whatchanged>
      <person>Elena Stepanova</person>
      <message></message>
    </activity>
    <activity datechanged="2012-06-04T15:18:05.301521+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[In Progress]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Timour Katchaounov</person>
      <message></message>
    </activity>
    <activity datechanged="2012-06-04T18:19:40.854193+00:00">
      <oldvalue>
<![CDATA[Timour Katchaounov (timour)]]>      </oldvalue>
      <newvalue>
<![CDATA[Oleksandr "Sanja" Byelkin (sanja-byelkin)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Timour Katchaounov</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1007647/comments/0" datecreated="2012-06-01T23:02:20.761586+00:00">
      <person>Elena Stepanova</person>
      <subject>
<![CDATA[Assertion `vcol_table == 0 || vcol_table == table' failed infill_record(THD*, List<Item>&, List<Item>&, bool) ]]>      </subject>
      <content>
<![CDATA[See also bug #1007622 (similar test case, might be the same problem) 

Version: '5.3.8-MariaDB-debug-log' 
mysqld: sql_base.cc:8694: bool fill_record(THD*, List<Item>&, List<Item>&, bool): Assertion `vcol_table == 0 || vcol_table == table' failed.

#8  0xb74fa014 in __assert_fail () from /lib/libc.so.6
#9  0x0833fded in fill_record (thd=0x93ee740, fields=..., values=..., 
    ignore_errors=false) at sql_base.cc:8694
#10 0x0833ff38 in fill_record_n_invoke_before_triggers (thd=0x93ee740, fields=..., 
    values=..., ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT)
    at sql_base.cc:8745
#11 0x0838b6be in mysql_insert (thd=0x93ee740, table_list=0x948d778, fields=..., 
    values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, 
    ignore=false) at sql_insert.cc:808
#12 0x082e66b6 in mysql_execute_command (thd=0x93ee740) at sql_parse.cc:3233
#13 0x082eef92 in mysql_parse (thd=0x93ee740, 
    rawbuf=0x948d6b8 "INSERT INTO v2 (f1, f2) VALUES (1, 2)", length=37, 
    found_semicolon=0xae973234) at sql_parse.cc:6153
#14 0x082e1955 in dispatch_command (command=COM_QUERY, thd=0x93ee740, 
    packet=0x9446331 "INSERT INTO v2 (f1, f2) VALUES (1, 2)", packet_length=37)
    at sql_parse.cc:1228
#15 0x082e0dff in do_command (thd=0x93ee740) at sql_parse.cc:923
#16 0x082ddcf5 in handle_one_connection (arg=0x93ee740) at sql_connect.cc:1218
#17 0xb7788b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: knielsen@knielsen-hq.org-20120601125647-nuqcxp06eit1y9j2
date: 2012-06-01 14:56:47 +0200
revno: 3536

Also reproducible on maria-5.5 revno 3425.
Could not reproduce on maria-5.2, mysql-5.5, mysql-trunk.
Reproducible with default optimizer_switch as well as with all OFF values.
Reproducible with MyISAM, Aria, InnoDB.

Test case:

CREATE TABLE t1 (f1 INT, f2 INT);
CREATE ALGORITHM=MERGE VIEW v1 AS SELECT a1.f1, a2.f2 FROM t1 AS a1, t1 AS a2;
CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM v1;
INSERT INTO v2 (f1, f2) VALUES (1, 2);

# End of test case

# End of test case]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1007647/comments/1" datecreated="2012-06-04T18:19:03.750774+00:00">
      <person>Timour Katchaounov</person>
      <subject>
<![CDATA[Re: Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool)]]>      </subject>
      <content>
<![CDATA[Since the test case for this bug is very similar to lp:1007622, and it also exposes the same difference in behavior as lp:1007622, I assign it to Sanja.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/maria/+bug/1007647/comments/2" datecreated="2012-07-23T18:41:21.920341+00:00">
      <person>Elena Stepanova</person>
      <subject>
<![CDATA[Re: Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool)]]>      </subject>
      <content>
<![CDATA[Still reproducible on 5.3 revno 3552, although lp:1007622 is fixed there -- so I assume it's not the same bug, after all.]]>      </content>
    </comment>
  </comments>
</launchpad-bug>
