SELECT * FROM ( SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL) ) sq;
|
Stack trace from 10.1 ed4a6f12b3
|
mysqld: /data/src/10.1/strings/decimal.c:1458: decimal_bin_size: Assertion `precision > 0' failed.
|
161011 15:06:49 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f7631c4b312 in __GI___assert_fail (assertion=0x7f763509f2c5 "precision > 0", file=0x7f763509f040 "/data/src/10.1/strings/decimal.c", line=1458, function=0x7f763509f530 <__PRETTY_FUNCTION__.11134> "decimal_bin_size") at assert.c:101
|
#8 0x00007f7634d30743 in decimal_bin_size (precision=0, scale=0) at /data/src/10.1/strings/decimal.c:1458
|
#9 0x00007f76344d18e8 in my_decimal_get_binary_size (precision=0, scale=0) at /data/src/10.1/sql/my_decimal.h:263
|
#10 0x00007f76346600a2 in Field_new_decimal::Field_new_decimal (this=0x7f762afd3688, len_arg=0, maybe_null_arg=true, name=0x7f7629044678 "IFNULL(CONVERT(NULL, UNSIGNED), NULL)", dec_arg=0 '\000', unsigned_arg=false) at /data/src/10.1/sql/field.cc:2936
|
#11 0x00007f76346601eb in Field_new_decimal::create_from_item (mem_root=0x7f76291d4b10, item=0x7f7629044598) at /data/src/10.1/sql/field.cc:2981
|
#12 0x00007f76344b6ebd in Item::create_tmp_field (this=0x7f7629044598, group=false, table=0x7f76291d4088, convert_int_length=9) at /data/src/10.1/sql/sql_select.cc:15883
|
#13 0x00007f76343a07c9 in Item::create_tmp_field (this=0x7f7629044598, group=false, table=0x7f76291d4088) at /data/src/10.1/sql/item.h:1639
|
#14 0x00007f76344b6f69 in create_tmp_field_from_item (thd=0x7f762affa070, item=0x7f7629044598, table=0x7f76291d4088, copy_func=0x7f7635363d48, modify_item=false) at /data/src/10.1/sql/sql_select.cc:15925
|
#15 0x00007f76344b7665 in create_tmp_field (thd=0x7f762affa070, table=0x7f76291d4088, item=0x7f7629044598, type=Item::FUNC_ITEM, copy_func=0x7f7635363d48, from_field=0x7f76291d5120, default_field=0x7f76291d5110, group=false, modify_item=false, table_cant_handle_bit_fields=false, make_copy_field=false) at /data/src/10.1/sql/sql_select.cc:16142
|
#16 0x00007f76344b8a3e in create_tmp_table (thd=0x7f762affa070, param=0x7f76290459e8, fields=..., group=0x0, distinct=false, save_sum_fields=true, select_options=2416188160, rows_limit=18446744073709551615, table_alias=0x7f7629044d50 "sq", do_not_open=true, keep_row_order=false) at /data/src/10.1/sql/sql_select.cc:16516
|
#17 0x00007f7634529463 in select_union::create_result_table (this=0x7f76290459c8, thd_arg=0x7f762affa070, column_types=0x7f76290442d0, is_union_distinct=false, options=2416188160, alias=0x7f7629044d50 "sq", bit_fields_as_long=false, create_table=false, keep_row_order=false) at /data/src/10.1/sql/sql_union.cc:159
|
#18 0x00007f76344293ba in mysql_derived_prepare (thd=0x7f762affa070, lex=0x7f762affd9f0, derived=0x7f7629044d90) at /data/src/10.1/sql/sql_derived.cc:696
|
#19 0x00007f7634428669 in mysql_handle_single_derived (lex=0x7f762affd9f0, derived=0x7f7629044d90, phases=2) at /data/src/10.1/sql/sql_derived.cc:195
|
#20 0x00007f763454de20 in TABLE_LIST::handle_derived (this=0x7f7629044d90, lex=0x7f762affd9f0, phases=2) at /data/src/10.1/sql/table.cc:7128
|
#21 0x00007f763444685e in st_select_lex::handle_derived (this=0x7f762affe1b8, lex=0x7f762affd9f0, phases=2) at /data/src/10.1/sql/sql_lex.cc:3823
|
#22 0x00007f763448e7a3 in JOIN::prepare (this=0x7f7629045450, rref_pointer_array=0x7f762affe430, tables_init=0x7f7629044d90, wild_num=1, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f762affe1b8, unit_arg=0x7f762affdab8) at /data/src/10.1/sql/sql_select.cc:711
|
#23 0x00007f7634498283 in mysql_select (thd=0x7f762affa070, rref_pointer_array=0x7f762affe430, tables=0x7f7629044d90, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f7629045430, unit=0x7f762affdab8, select_lex=0x7f762affe1b8) at /data/src/10.1/sql/sql_select.cc:3416
|
#24 0x00007f763448de2a in handle_select (thd=0x7f762affa070, lex=0x7f762affd9f0, result=0x7f7629045430, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:384
|
#25 0x00007f763445e027 in execute_sqlcom_select (thd=0x7f762affa070, all_tables=0x7f7629044d90) at /data/src/10.1/sql/sql_parse.cc:5895
|
#26 0x00007f7634453f34 in mysql_execute_command (thd=0x7f762affa070) at /data/src/10.1/sql/sql_parse.cc:2961
|
#27 0x00007f7634461780 in mysql_parse (thd=0x7f762affa070, rawbuf=0x7f7629043088 "SELECT * FROM ( SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL) ) sq", length=65, parser_state=0x7f76353655e0) at /data/src/10.1/sql/sql_parse.cc:7318
|
#28 0x00007f7634450189 in dispatch_command (command=COM_QUERY, thd=0x7f762affa070, packet=0x7f762c93e071 "SELECT * FROM ( SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL) ) sq", packet_length=65) at /data/src/10.1/sql/sql_parse.cc:1487
|
#29 0x00007f763444eec0 in do_command (thd=0x7f762affa070) at /data/src/10.1/sql/sql_parse.cc:1108
|
#30 0x00007f7634584d9b in do_handle_one_connection (thd_arg=0x7f762affa070) at /data/src/10.1/sql/sql_connect.cc:1350
|
#31 0x00007f7634584aff in handle_one_connection (arg=0x7f762affa070) at /data/src/10.1/sql/sql_connect.cc:1262
|
#32 0x00007f76348677f8 in pfs_spawn_thread (arg=0x7f7631427ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1860
|
#33 0x00007f7633b4d0a4 in start_thread (arg=0x7f7635366b00) at pthread_create.c:309
|
#34 0x00007f7631d0587d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
A similar crash happens on these queries:
CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL, UNSIGNED), NULL);
|
CREATE TABLE t1 AS SELECT COALESCE(CONVERT(NULL, UNSIGNED), NULL);
|
CREATE TABLE t1 AS SELECT CASE WHEN TRUE THEN CONVERT(NULL, UNSIGNED) ELSE NULL END;
|
And on this query:
CREATE TABLE t1 AS SELECT IFNULL(CONVERT(NULL,SIGNED),CONVERT(NULL,UNSIGNED)) AS a;
|
A related problem:
CREATE OR REPLACE TABLE t1 AS SELECT CONVERT(NULL,SIGNED) AS a;
|
SHOW FIELDS IN t1;
|
+-------+--------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+--------+------+-----+---------+-------+
|
| a | int(0) | YES | | NULL | |
|
+-------+--------+------+-----+---------+-------+
|
int(0) is not an expected data type. It should be int(1).
A related problem:
CREATE OR REPLACE TABLE t1 AS SELECT CONCAT(CONVERT(NULL,SIGNED)) AS a;
|
SHOW FIELDS IN t1;
|
+-------+---------+------+-----+---------+-------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+---------+------+-----+---------+-------+
|
| a | char(0) | YES | | NULL | |
|
+-------+---------+------+-----+---------+-------+
|
char(0) is not an expected data type. It should be char(1).
- relates to
-
MDEV-11015
Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
-
-
Closed
{"report":{"fcp":1149.0999999046326,"ttfb":435.30000019073486,"pageVisibility":"visible","entityId":58433,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"a689d879-900d-4f49-a1aa-a2edc9862ac3","navigationType":0,"readyForUser":1250.5,"redirectCount":0,"resourceLoadedEnd":1596.8000001907349,"resourceLoadedStart":441.5,"resourceTiming":[{"duration":184.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":441.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":441.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":626.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":184.7999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":441.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":441.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":626.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":242.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":441.90000009536743,"connectEnd":441.90000009536743,"connectStart":441.90000009536743,"domainLookupEnd":441.90000009536743,"domainLookupStart":441.90000009536743,"fetchStart":441.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":441.90000009536743,"responseEnd":684.8000001907349,"responseStart":684.8000001907349,"secureConnectionStart":441.90000009536743},{"duration":325,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":442.09999990463257,"connectEnd":442.09999990463257,"connectStart":442.09999990463257,"domainLookupEnd":442.09999990463257,"domainLookupStart":442.09999990463257,"fetchStart":442.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":442.09999990463257,"responseEnd":767.0999999046326,"responseStart":767.0999999046326,"secureConnectionStart":442.09999990463257},{"duration":328.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":442.40000009536743,"connectEnd":442.40000009536743,"connectStart":442.40000009536743,"domainLookupEnd":442.40000009536743,"domainLookupStart":442.40000009536743,"fetchStart":442.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":442.40000009536743,"responseEnd":771,"responseStart":771,"secureConnectionStart":442.40000009536743},{"duration":328.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":442.59999990463257,"connectEnd":442.59999990463257,"connectStart":442.59999990463257,"domainLookupEnd":442.59999990463257,"domainLookupStart":442.59999990463257,"fetchStart":442.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":442.59999990463257,"responseEnd":771.5,"responseStart":771.5,"secureConnectionStart":442.59999990463257},{"duration":329.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":442.80000019073486,"connectEnd":442.80000019073486,"connectStart":442.80000019073486,"domainLookupEnd":442.80000019073486,"domainLookupStart":442.80000019073486,"fetchStart":442.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":442.80000019073486,"responseEnd":771.9000000953674,"responseStart":771.9000000953674,"secureConnectionStart":442.80000019073486},{"duration":385.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":443.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":443.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":828.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":329,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":443.30000019073486,"connectEnd":443.30000019073486,"connectStart":443.30000019073486,"domainLookupEnd":443.30000019073486,"domainLookupStart":443.30000019073486,"fetchStart":443.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":443.30000019073486,"responseEnd":772.3000001907349,"responseStart":772.3000001907349,"secureConnectionStart":443.30000019073486},{"duration":385.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":443.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":443.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":828.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":329.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":443.69999980926514,"connectEnd":443.69999980926514,"connectStart":443.69999980926514,"domainLookupEnd":443.69999980926514,"domainLookupStart":443.69999980926514,"fetchStart":443.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":443.69999980926514,"responseEnd":772.9000000953674,"responseStart":772.9000000953674,"secureConnectionStart":443.69999980926514},{"duration":956.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":444.80000019073486,"connectEnd":444.80000019073486,"connectStart":444.80000019073486,"domainLookupEnd":444.80000019073486,"domainLookupStart":444.80000019073486,"fetchStart":444.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":444.80000019073486,"responseEnd":1401.6999998092651,"responseStart":1401.6999998092651,"secureConnectionStart":444.80000019073486},{"duration":1151.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":444.90000009536743,"connectEnd":444.90000009536743,"connectStart":444.90000009536743,"domainLookupEnd":444.90000009536743,"domainLookupStart":444.90000009536743,"fetchStart":444.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":444.90000009536743,"responseEnd":1596.8000001907349,"responseStart":1596.8000001907349,"secureConnectionStart":444.90000009536743},{"duration":563.1999998092651,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":841,"connectEnd":841,"connectStart":841,"domainLookupEnd":841,"domainLookupStart":841,"fetchStart":841,"redirectEnd":0,"redirectStart":0,"requestStart":841,"responseEnd":1404.1999998092651,"responseStart":1404.1999998092651,"secureConnectionStart":841},{"duration":477,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1140,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1140,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1617,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":268,"responseStart":435,"responseEnd":438,"domLoading":438,"domInteractive":1619,"domContentLoadedEventStart":1619,"domContentLoadedEventEnd":1665,"domComplete":1951,"loadEventStart":1951,"loadEventEnd":1952,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1601.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1602.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1602.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1603.4000000953674},{"name":"activityTabFullyLoaded","time":1680}],"measures":[],"correlationId":"92a67339c7ebe6","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
revision-id: fabeab808b37b881d689d4c59ca8fd37d01a698c (mariadb-10.1.20-33-gfabeab808b3)
parent(s): 5044dae239d094582879792de7a762d3428223ce
committer: Oleksandr Byelkin
timestamp: 2017-01-11 11:26:49 +0100
message:
MDEV-11030: Assertion `precision > 0' failed in decimal_bin_sizecheck Item parameters
—