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

Assertion `val <= 4294967295u' failed in fts_encode_int

    Details

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c TINYTEXT, PRIMARY KEY (FTS_DOC_ID), FULLTEXT KEY (c)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1,'txt');
      UPDATE t1 SET FTS_DOC_ID = 4294967298;
       
      # Cleanup
      DROP TABLE t1;
      

      10.3 462d6893

      2019-05-18 19:30:23 9 [Warning] InnoDB: Doc ID 4294967298 is too big. Its difference with largest Doc ID used 1 cannot exceed or equal to 65535
      mysqld: /data/src/10.3/storage/innobase/include/fts0vlc.ic:96: ulint fts_encode_int(ulint, byte*): Assertion `val <= 4294967295u' failed.
      190518 19:30:23 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f19c668cf12 in __GI___assert_fail (assertion=0x55b7f1ad9b43 "val <= 4294967295u", file=0x55b7f1ad9b10 "/data/src/10.3/storage/innobase/include/fts0vlc.ic", line=96, function=0x55b7f1adcca0 <fts_encode_int(unsigned long, unsigned char*)::__PRETTY_FUNCTION__> "ulint fts_encode_int(ulint, byte*)") at assert.c:101
      #8  0x000055b7f14f1747 in fts_encode_int (val=4294967297, buf=0x7f19680a7273 "h\031\177") at /data/src/10.3/storage/innobase/include/fts0vlc.ic:96
      #9  0x000055b7f14f4016 in fts_cache_node_add_positions (cache=0x7f196800c1f8, node=0x7f196800c890, doc_id=4294967298, positions=0x7f19680431b0) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:1317
      #10 0x000055b7f14f4342 in fts_cache_add_doc (cache=0x7f196800c1f8, index_cache=0x7f196800c5d8, doc_id=4294967298, tokens=0x7f19680476e0) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:1414
      #11 0x000055b7f14f8b46 in fts_add_doc_by_id (ftt=0x7f196800ac68, doc_id=4294967298, fts_indexes=0x0) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:3561
      #12 0x000055b7f14f70a5 in fts_add (ftt=0x7f196800ac68, row=0x7f1968037f50) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:2849
      #13 0x000055b7f14f784c in fts_commit_table (ftt=0x7f196800ac68) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:3021
      #14 0x000055b7f14f7940 in fts_commit (trx=0x7f19c05230f0) at /data/src/10.3/storage/innobase/fts/fts0fts.cc:3070
      #15 0x000055b7f13b5e28 in trx_commit_low (trx=0x7f19c05230f0, mtr=0x7f19c0288c30) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1445
      #16 0x000055b7f13b5ff3 in trx_commit (trx=0x7f19c05230f0) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1534
      #17 0x000055b7f13b63fc in trx_commit_for_mysql (trx=0x7f19c05230f0) at /data/src/10.3/storage/innobase/trx/trx0trx.cc:1670
      #18 0x000055b7f11931ff in innobase_commit_low (trx=0x7f19c05230f0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4410
      #19 0x000055b7f1193594 in innobase_commit_ordered_2 (trx=0x7f19c05230f0, thd=0x7f1968000b00) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4524
      #20 0x000055b7f1193a82 in innobase_commit (hton=0x55b7f400c670, thd=0x7f1968000b00, commit_trx=false) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4640
      #21 0x000055b7f0f899be in commit_one_phase_2 (thd=0x7f1968000b00, all=false, trans=0x7f1968004030, is_real_trans=true) at /data/src/10.3/sql/handler.cc:1615
      #22 0x000055b7f0f898ba in ha_commit_one_phase (thd=0x7f1968000b00, all=false) at /data/src/10.3/sql/handler.cc:1595
      #23 0x000055b7f0f89053 in ha_commit_trans (thd=0x7f1968000b00, all=false) at /data/src/10.3/sql/handler.cc:1457
      #24 0x000055b7f0e041dc in trans_commit_stmt (thd=0x7f1968000b00) at /data/src/10.3/sql/transaction.cc:505
      #25 0x000055b7f0c9748c in mysql_execute_command (thd=0x7f1968000b00) at /data/src/10.3/sql/sql_parse.cc:6367
      #26 0x000055b7f0c9c1b8 in mysql_parse (thd=0x7f1968000b00, rawbuf=0x7f1968012808 "UPDATE t1 SET FTS_DOC_ID = 4294967298", length=37, parser_state=0x7f19c028a5f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8098
      #27 0x000055b7f0c891fa in dispatch_command (command=COM_QUERY, thd=0x7f1968000b00, packet=0x7f196815fe71 "UPDATE t1 SET FTS_DOC_ID = 4294967298", packet_length=37, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1858
      #28 0x000055b7f0c87c1d in do_command (thd=0x7f1968000b00) at /data/src/10.3/sql/sql_parse.cc:1403
      #29 0x000055b7f0defd65 in do_handle_one_connection (connect=0x55b7f4347020) at /data/src/10.3/sql/sql_connect.cc:1402
      #30 0x000055b7f0defadc in handle_one_connection (arg=0x55b7f4347020) at /data/src/10.3/sql/sql_connect.cc:1308
      #31 0x000055b7f16c5650 in pfs_spawn_thread (arg=0x55b7f428a680) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #32 0x00007f19c82014a4 in start_thread (arg=0x7f19c028b700) at pthread_create.c:456
      #33 0x00007f19c6749d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.1-10.4 debug.
      Non-debug just produces the warning which is probably expected:

      2019-05-18 19:34:16 9 [Warning] InnoDB: Doc ID 4294967298 is too big. Its difference with largest Doc ID used 1 cannot exceed or equal to 65535
      

        Attachments

          Activity

            People

            • Assignee:
              thiru Thirunarayanan Balathandayuthapani
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: