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

Assertion `inited==RND' failed in handler::ha_rnd_end() or crash in in ha_innobase::innobase_get_index

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.3
    • Fix Version/s: 10.3.11
    • Component/s: Partitioning
    • Labels:
      None

      Description

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      CREATE TABLE t1 (
        pk int NOT NULL ,
        col_int_nokey int,
        col_int_key int,
        col_varchar_key varchar(3),
        col_varchar_nokey varchar(35),
        PRIMARY KEY (pk),
        KEY col_int_key (col_int_key),
        KEY col_varchar_key (col_varchar_key,col_varchar_nokey)
      )WITH SYSTEM VERSIONING
       PARTITION BY SYSTEM_TIME INTERVAL 8 DAY
      (PARTITION ver_p1 HISTORY ENGINE = InnoDB,
       PARTITION ver_pn CURRENT ENGINE = InnoDB);
       
       
      INSERT INTO t1 VALUES (3793,801,801,'USA','New York'),(3794,369,369,'USA','Los Angeles'),(3795,290,290,'USA','Chicago'),(3796,195,195,'USA','Houston'),(3797,152,152,'USA','Philadelphia'),(3798,132,132,'USA','Phoenix'),(3799,122,122,'USA','San Diego'),(3800,119,119,'USA','Dallas'),(3801,114,114,'USA','San Antonio'),(3802,95,95,'USA','Detroit'),(3803,89,89,'USA','San Jose'),(3804,79,79,'USA','Indianapolis'),(3805,78,78,'USA','San Francisco'),(3806,74,74,'USA','Jacksonville'),(3807,71,71,'USA','Columbus'),(3808,66,66,'USA','Austin'),(3809,65,65,'USA','Baltimore'),(3810,65,65,'USA','Memphis'),(3811,60,60,'USA','Milwaukee'),(3812,59,59,'USA','Boston'),(3813,57,57,'USA','Washington'),(3814,57,57,'USA','Nashville-Davidson'),(3815,56,56,'USA','El Paso'),(3816,56,56,'USA','Seattle'),(3817,55,55,'USA','Denver'),(3818,54,54,'USA','Charlotte'),(3819,53,53,'USA','Fort Worth'),(3820,53,53,'USA','Portland'),(3821,51,51,'USA','Oklahoma City'),(3822,49,49,'USA','Tucson'),(3823,48,48,'USA','New Orleans'),(3824,48,48,'USA','Las Vegas'),(3825,48,48,'USA','Cleveland'),(3826,46,46,'USA','Long Beach'),(3827,45,45,'USA','Albuquerque'),(3828,44,44,'USA','Kansas City'),(3829,43,43,'USA','Fresno'),(3830,43,43,'USA','Virginia Beach'),(3831,42,42,'USA','Atlanta'),(3832,41,41,'USA','Sacramento'),(3833,40,40,'USA','Oakland'),(3834,40,40,'USA','Mesa'),(3835,39,39,'USA','Tulsa'),(3836,39,39,'USA','Omaha'),(3837,38,38,'USA','Minneapolis'),(3838,37,37,'USA','Honolulu'),(3839,36,36,'USA','Miami'),(3840,36,36,'USA','Colorado Springs'),(3841,35,35,'USA','Saint Louis'),(3842,34,34,'USA','Wichita'),(3843,34,34,'USA','Santa Ana'),(3844,33,33,'USA','Pittsburgh'),(3845,33,33,'USA','Arlington'),(3846,33,33,'USA','Cincinnati'),(3847,33,33,'USA','Anaheim'),(3848,31,31,'USA','Toledo'),(3849,30,30,'USA','Tampa'),(3850,29,29,'USA','Buffalo'),(3851,29,29,'USA','Saint Paul'),(3852,28,28,'USA','Corpus Christi'),(3853,28,28,'USA','Aurora'),(3854,28,28,'USA','Raleigh'),(3855,27,27,'USA','Newark'),(3856,26,26,'USA','Lexington-Fayette'),(3857,26,26,'USA','Anchorage'),(3858,26,26,'USA','Louisville'),(3859,26,26,'USA','Riverside'),(3860,25,25,'USA','Saint Petersburg'),(3861,25,25,'USA','Bakersfield'),(3862,24,24,'USA','Stockton'),(3863,24,24,'USA','Birmingham'),(3864,24,24,'USA','Jersey City'),(3865,23,23,'USA','Norfolk'),(3866,23,23,'USA','Baton Rouge'),(3867,23,23,'USA','Hialeah'),(3868,23,23,'USA','Lincoln'),(3869,22,22,'USA','Greensboro'),(3870,22,22,'USA','Plano'),(3871,22,22,'USA','Rochester'),(3872,22,22,'USA','Glendale'),(3873,22,22,'USA','Akron'),(3874,22,22,'USA','Garland'),(3875,21,21,'USA','Madison'),(3876,21,21,'USA','Fort Wayne'),(3877,20,20,'USA','Fremont'),(3878,20,20,'USA','Scottsdale'),(3879,20,20,'USA','Montgomery'),(3880,20,20,'USA','Shreveport'),(3881,20,20,'USA','Augusta-Richmond County'),(3882,20,20,'USA','Lubbock'),(3883,20,20,'USA','Chesapeake'),(3884,20,20,'USA','Mobile'),(3885,20,20,'USA','Des Moines'),(3886,20,20,'USA','Grand Rapids'),(3887,20,20,'USA','Richmond'),(3888,20,20,'USA','Yonkers'),(3889,20,20,'USA','Spokane'),(3890,19,19,'USA','Glendale'),(3891,19,19,'USA','Tacoma'),(3892,19,19,'USA','Irving'),(3893,19,19,'USA','Huntington Beach'),(3894,19,19,'USA','Modesto'),(3895,19,19,'USA','Durham'),(3896,19,19,'USA','Columbus'),(3897,19,19,'USA','Orlando'),(3898,19,19,'USA','Boise City'),(3899,19,19,'USA','Winston-Salem'),(3900,19,19,'USA','San Bernardino'),(3901,18,18,'USA','Jackson'),(3902,18,18,'USA','Little Rock'),(3903,18,18,'USA','Salt Lake City'),(3904,18,18,'USA','Reno'),(3905,18,18,'USA','Newport News'),(3906,18,18,'USA','Chandler'),(3907,18,18,'USA','Laredo'),(3908,18,18,'USA','Henderson'),(3909,17,17,'USA','Arlington'),(3910,17,17,'USA','Knoxville'),(3911,17,17,'USA','Amarillo'),(3912,17,17,'USA','Providence'),(3913,17,17,'USA','Chula Vista'),(3914,17,17,'USA','Worcester'),(3915,17,17,'USA','Oxnard'),(3916,17,17,'USA','Dayton'),(3917,17,17,'USA','Garden Grove'),(3918,16,16,'USA','Oceanside'),(3919,16,16,'USA','Tempe'),(3920,16,16,'USA','Huntsville'),(3921,16,16,'USA','Ontario'),(3922,16,16,'USA','Chattanooga'),(3923,15,15,'USA','Fort Lauderdale'),(3924,15,15,'USA','Springfield'),(3925,15,15,'USA','Springfield'),(3926,15,15,'USA','Santa Clarita'),(3927,15,15,'USA','Salinas'),(3928,15,15,'USA','Tallahassee'),(3929,15,15,'USA','Rockford'),(3930,15,15,'USA','Pomona'),(3931,15,15,'USA','Metairie'),(3932,15,15,'USA','Paterson'),(3933,15,15,'USA','Overland Park'),(3934,15,15,'USA','Santa Rosa'),(3935,15,15,'USA','Syracuse'),(3936,15,15,'USA','Kansas City'),(3937,15,15,'USA','Hampton'),(3938,14,14,'USA','Lakewood'),(3939,14,14,'USA','Vancouver'),(3940,14,14,'USA','Irvine'),(3941,14,14,'USA','Aurora'),(3942,14,14,'USA','Moreno Valley'),(3943,14,14,'USA','Pasadena'),(3944,14,14,'USA','Hayward'),(3945,14,14,'USA','Brownsville'),(3946,14,14,'USA','Bridgeport'),(3947,14,14,'USA','Hollywood'),(3948,14,14,'USA','Warren'),(3949,14,14,'USA','Torrance'),(3950,14,14,'USA','Eugene'),(3951,14,14,'USA','Pembroke Pines'),(3952,14,14,'USA','Salem'),(3953,13,13,'USA','Pasadena'),(3954,13,13,'USA','Escondido'),(3955,13,13,'USA','Sunnyvale'),(3956,13,13,'USA','Savannah'),(3957,13,13,'USA','Fontana'),(3958,13,13,'USA','Orange'),(3959,13,13,'USA','Naperville'),(3960,13,13,'USA','Alexandria'),(3961,13,13,'USA','Rancho Cucamonga'),(3962,13,13,'USA','Grand Prairie'),(3963,13,13,'USA','East Los Angeles'),(3964,13,13,'USA','Fullerton'),(3965,12,12,'USA','Corona'),(3966,12,12,'USA','Flint'),(3967,12,12,'USA','Paradise'),(3968,12,12,'USA','Mesquite'),(3969,12,12,'USA','Sterling Heights'),(3970,12,12,'USA','Sioux Falls'),(3971,12,12,'USA','New Haven'),(3972,12,12,'USA','Topeka'),(3973,12,12,'USA','Concord'),(3974,12,12,'USA','Evansville'),(3975,12,12,'USA','Hartford'),(3976,12,12,'USA','Fayetteville'),(3977,12,12,'USA','Cedar Rapids'),(3978,12,12,'USA','Elizabeth'),(3979,12,12,'USA','Lansing'),(3980,12,12,'USA','Lancaster'),(3981,12,12,'USA','Fort Collins'),(3982,12,12,'USA','Coral Springs'),(3983,12,12,'USA','Stamford'),(3984,12,12,'USA','Thousand Oaks'),(3985,12,12,'USA','Vallejo'),(3986,12,12,'USA','Palmdale'),(3987,12,12,'USA','Columbia'),(3988,12,12,'USA','El Monte'),(3989,12,12,'USA','Abilene'),(3990,12,12,'USA','North Las Vegas'),(3991,11,11,'USA','Ann Arbor'),(3992,11,11,'USA','Beaumont'),(3993,11,11,'USA','Waco'),(3994,11,11,'USA','Macon'),(3995,11,11,'USA','Independence'),(3996,11,11,'USA','Peoria'),(3997,11,11,'USA','Inglewood'),(3998,11,11,'USA','Springfield'),(3999,11,11,'USA','Simi Valley'),(4000,11,11,'USA','Lafayette'),(4001,11,11,'USA','Gilbert'),(4002,11,11,'USA','Carrollton'),(4003,11,11,'USA','Bellevue'),(4004,11,11,'USA','West Valley City'),(4005,11,11,'USA','Clarksville'),(4006,11,11,'USA','Costa Mesa'),(4007,11,11,'USA','Peoria'),(4008,11,11,'USA','South Bend'),(4009,11,11,'USA','Downey'),(4010,11,11,'USA','Waterbury'),(4011,11,11,'USA','Manchester'),(4012,11,11,'USA','Allentown'),(4013,11,11,'USA','McAllen'),(4014,11,11,'USA','Joliet'),(4015,11,11,'USA','Lowell'),(4016,11,11,'USA','Provo'),(4017,11,11,'USA','West Covina'),(4018,10,10,'USA','Wichita Falls'),(4019,10,10,'USA','Erie'),(4020,10,10,'USA','Daly City'),(4021,10,10,'USA','Citrus Heights'),(4022,10,10,'USA','Norwalk'),(4023,10,10,'USA','Gary'),(4024,10,10,'USA','Berkeley'),(4025,10,10,'USA','Santa Clara'),(4026,10,10,'USA','Green Bay'),(4027,10,10,'USA','Cape Coral'),(4028,10,10,'USA','Arvada'),(4029,10,10,'USA','Pueblo'),(4030,10,10,'USA','Sandy'),(4031,10,10,'USA','Athens-Clarke County'),(4032,10,10,'USA','Cambridge'),(4033,10,10,'USA','Westminster'),(4034,10,10,'USA','San Buenaventura'),(4035,10,10,'USA','Portsmouth'),(4036,10,10,'USA','Livonia'),(4037,10,10,'USA','Burbank'),(4038,10,10,'USA','Clearwater'),(4039,10,10,'USA','Midland'),(4040,10,10,'USA','Davenport'),(4041,10,10,'USA','Mission Viejo'),(4042,10,10,'USA','Miami Beach'),(4043,10,10,'USA','Sunrise Manor'),(4044,9,9,'USA','New Bedford'),(4045,9,9,'USA','El Cajon'),(4046,9,9,'USA','Norman'),(4047,9,9,'USA','Richmond'),(4048,9,9,'USA','Albany'),(4049,9,9,'USA','Brockton'),(4050,9,9,'USA','Roanoke'),(4051,9,9,'USA','Billings'),(4052,9,9,'USA','Compton'),(4053,9,9,'USA','Gainesville'),(4054,9,9,'USA','Fairfield'),(4055,9,9,'USA','Arden-Arcade'),(4056,9,9,'USA','San Mateo'),(4057,9,9,'USA','Visalia'),(4058,9,9,'USA','Boulder'),(4059,9,9,'USA','Cary'),(4060,9,9,'USA','Santa Monica'),(4061,9,9,'USA','Fall River'),(4062,9,9,'USA','Kenosha'),(4063,9,9,'USA','Elgin'),(4064,9,9,'USA','Odessa'),(4065,9,9,'USA','Carson'),(4066,9,9,'USA','Charleston'),(4067,NULL,NULL,NULL,NULL),(4068,NULL,NULL,NULL,NULL),(4069,NULL,NULL,NULL,NULL),(4070,NULL,NULL,NULL,NULL);
       
      SELECT COUNT(*) FROM t1
      WHERE col_varchar_nokey IS NULL 
        AND col_int_key IS NULL
        AND col_varchar_key IS NULL;
      

       10.3 7aba6f8f8853acd18d471793f8b72aa1412b8151
      Thread 1 (Thread 0x7f41c2544700 (LWP 32620)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x00005598fd9cf362 in my_write_core (sig=6) at /10.3/mysys/stacktrace.c:481
      #2  0x00005598fd21833f in handle_fatal_signal (sig=6) at /10.3/sql/signal_handler.cc:305
      #3  <signal handler called>
      #4  0x00007f41c8f4e428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007f41c8f5002a in __GI_abort () at abort.c:89
      #6  0x00007f41c8f46bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5598fda80694 "inited==RND", file=file@entry=0x5598fda80630 "/10.3/sql/handler.h", line=line@entry=3069, function=function@entry=0x5598fda84a70 <handler::ha_rnd_end()::__PRETTY_FUNCTION__> "int handler::ha_rnd_end()") at assert.c:92
      #7  0x00007f41c8f46c82 in __GI___assert_fail (assertion=0x5598fda80694 "inited==RND", file=0x5598fda80630 "/10.3/sql/handler.h", line=3069, function=0x5598fda84a70 <handler::ha_rnd_end()::__PRETTY_FUNCTION__> "int handler::ha_rnd_end()") at assert.c:101
      #8  0x00005598fce914e0 in handler::ha_rnd_end (this=0x7f4178078d78) at /10.3/sql/handler.h:3069
      #9  0x00005598fd0d9fa5 in DsMrr_impl::dsmrr_init (this=0x7f41780791c0, h_arg=0x7f4178078d78, seq_funcs=0x7f4178098660, seq_init_param=0x7f4178098788, n_ranges=1, mode=72, buf=0x7f4178098728) at /10.3/sql/multi_range_read.cc:1016
      #10 0x00005598fd580440 in ha_innobase::multi_range_read_init (this=0x7f4178078d78, seq=0x7f4178098660, seq_init_param=0x7f4178098788, n_ranges=1, mode=72, buf=0x7f4178098728) at /10.3/storage/innobase/handler/ha_innodb.cc:20335
      #11 0x00005598fd98eed4 in ha_partition::multi_range_read_init (this=0x7f4178097e78, seq=0x7f41c2542270, seq_init_param=0x7f4178091000, n_ranges=1, mrr_mode=72, buf=0x7f41c2542230) at /10.3/sql/ha_partition.cc:6440
      #12 0x00005598fd38e8ad in QUICK_RANGE_SELECT::reset (this=0x7f4178091000) at /10.3/sql/opt_range.cc:11411
      #13 0x00005598fd377660 in QUICK_ROR_INTERSECT_SELECT::reset (this=0x7f4178090f40) at /10.3/sql/opt_range.cc:1650
      #14 0x00005598fcfa0621 in join_init_read_record (tab=0x7f4178018890) at /10.3/sql/sql_select.cc:20212
      #15 0x00005598fcf9e403 in sub_select (join=0x7f4178015ec8, join_tab=0x7f4178018890, end_of_records=false) at /10.3/sql/sql_select.cc:19292
      #16 0x00005598fcf9d9a1 in do_select (join=0x7f4178015ec8, procedure=0x0) at /10.3/sql/sql_select.cc:18835
      #17 0x00005598fcf76c59 in JOIN::exec_inner (this=0x7f4178015ec8) at /10.3/sql/sql_select.cc:4035
      #18 0x00005598fcf760cc in JOIN::exec (this=0x7f4178015ec8) at /10.3/sql/sql_select.cc:3829
      #19 0x00005598fcf77333 in mysql_select (thd=0x7f4178000b00, tables=0x7f4178015098, wild_num=0, fields=..., conds=0x7f4178015ac0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f4178015ea0, unit=0x7f41780049b0, select_lex=0x7f4178005120) at /10.3/sql/sql_select.cc:4234
      #20 0x00005598fcf69290 in handle_select (thd=0x7f4178000b00, lex=0x7f41780048e8, result=0x7f4178015ea0, setup_tables_done_option=0) at /10.3/sql/sql_select.cc:382
      #21 0x00005598fcf33b6c in execute_sqlcom_select (thd=0x7f4178000b00, all_tables=0x7f4178015098) at /10.3/sql/sql_parse.cc:6547
      #22 0x00005598fcf29fc3 in mysql_execute_command (thd=0x7f4178000b00) at /10.3/sql/sql_parse.cc:3769
      #23 0x00005598fcf37af1 in mysql_parse (thd=0x7f4178000b00, rawbuf=0x7f4178014d18 "SELECT COUNT(*) FROM t1\nWHERE col_varchar_nokey IS NULL \nAND col_int_key IS NULL\nAND col_varchar_key IS NULL", length=108, parser_state=0x7f41c2543470, is_com_multi=false, is_next_command=false) at /10.3/sql/sql_parse.cc:8089
      #24 0x00005598fcf24a96 in dispatch_command (command=COM_QUERY, thd=0x7f4178000b00, packet=0x7f41781671f1 "", packet_length=108, is_com_multi=false, is_next_command=false) at /10.3/sql/sql_parse.cc:1850
      #25 0x00005598fcf234b3 in do_command (thd=0x7f4178000b00) at /10.3/sql/sql_parse.cc:1395
      #26 0x00005598fd089f3b in do_handle_one_connection (connect=0x5598ff513b50) at /10.3/sql/sql_connect.cc:1402
      #27 0x00005598fd089c8c in handle_one_connection (arg=0x5598ff513b50) at /10.3/sql/sql_connect.cc:1308
      #28 0x00005598fd95f748 in pfs_spawn_thread (arg=0x5598ff51bec0) at /10.3/storage/perfschema/pfs.cc:1862
      #29 0x00007f41c9b8b6ba in start_thread (arg=0x7f41c2544700) at pthread_create.c:333
      #30 0x00007f41c902041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                midenok Aleksey Midenkov
                Reporter:
                alice Alice Sherepa
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: