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

LP:604549 - RQG: Illegal virtual column definition causes assertion in Item_row::illegal_method_call()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The following SQL (note nested brackets and the comma) causes the server to assert:

      CREATE TABLE `X` (
      `f1` int(11) NOT NULL DEFAULT '0',
      `v4` double AS (( 1 , f1 )) VIRTUAL
      );

      INSERT INTO `X` VALUES (8,1);

      There seems to be two separate issues here. One is that the table could be created in first place, and the other is as crash on INSERT where the virtual column is given an explicit value (as done, for example, by mysqldump).

      mysqld: item_row.cc:56: void Item_row::illegal_method_call(const char*): Assertion `0' failed.

      #8 0x00897de8 in __assert_fail () from /lib/libc.so.6
      #9 0x08229fe7 in Item_row::illegal_method_call (this=0xb5edcfd8, method=0x87f1bc8 "val_int") at item_row.cc:56
      #10 0x0822a7cf in Item_row::val_int (this=0xb5edcfd8) at item_row.h:49
      #11 0x081bb793 in Item::save_in_field (this=0xb5edcfd8, field=0xb5edce70, no_conversions=false) at item.cc:5210
      #12 0x082e2a0e in update_virtual_fields (table=0xb5edbf48, for_write=true) at table.cc:5448
      #13 0x082d36fe in fill_record (thd=0xad28658, ptr=0xb5edcd7c, values=..., ignore_errors=false) at sql_base.cc:8414
      #14 0x082d37f4 in fill_record_n_invoke_before_triggers (thd=0xad28658, ptr=0xb5edcd70, values=..., ignore_errors=false, triggers=0x0, event=TRG_EVENT_INSERT)
      at sql_base.cc:8465
      #15 0x083144ae in mysql_insert (thd=0xad28658, table_list=0xb5e461b8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR,
      ignore=false) at sql_insert.cc:820
      #16 0x0828153b in mysql_execute_command (thd=0xad28658) at sql_parse.cc:3209
      #17 0x08289fa0 in mysql_parse (thd=0xad28658, inBuf=0xb5e46100 "INSERT INTO `X` VALUES (8,1)", length=28, found_semicolon=0xb5fff230) at sql_parse.cc:6024
      #18 0x0827c1fa in dispatch_command (command=COM_QUERY, thd=0xad28658, packet=0xad40571 "INSERT INTO `X` VALUES (8,1)", packet_length=28) at sql_parse.cc:1183
      #19 0x0827b6a0 in do_command (thd=0xad28658) at sql_parse.cc:890
      #20 0x08278800 in handle_one_connection (arg=0xad28658) at sql_connect.cc:1153
      #21 0x00a08919 in start_thread () from /lib/libpthread.so.0
      #22 0x00951e5e in clone () from /lib/libc.so.6

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 604549

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 604549

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: