[MDEV-589] LP:1007647 - Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool) Created: 2012-06-01  Updated: 2012-10-14  Resolved: 2012-10-14

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.5.28a, 5.3.10

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug1007647.xml    

 Description   

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);

  1. End of test case
  1. End of test case


 Comments   
Comment by Timour Katchaounov (Inactive) [ 2012-06-04 ]

Re: Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool)
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.

Comment by Elena Stepanova [ 2012-07-23 ]

Re: Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, List<Item>&, List<Item>&, bool)
Still reproducible on 5.3 revno 3552, although lp:1007622 is fixed there – so I assume it's not the same bug, after all.

Comment by Rasmus Johansson (Inactive) [ 2012-07-23 ]

Launchpad bug id: 1007647

Comment by Oleksandr Byelkin [ 2012-10-05 ]

The query is inserting into two different tables (actually the underlying table is the same but from different parts of join so it is different tables).

Comment by Oleksandr Byelkin [ 2012-10-05 ]

The problem is incorrectly detected merged view in tem_direct_view_ref::used_tables().

Comment by Oleksandr Byelkin [ 2012-10-05 ]

Committed.

Comment by Oleksandr Byelkin [ 2012-10-08 ]

pushed

Comment by Oleksandr Byelkin [ 2012-10-14 ]

tested on buildbot.

Generated at Thu Feb 08 06:29:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.