MariaDB Crashes get_datetime_value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Critical
|
Sergei Golubchik |
Bug Description
The following Query Crashed MariaDB 5.3.6
SELECT
DATE_FORMAT(
(
SELECT MIN(date_effective)
FROM barn_schedule ees
WHERE
ees.apple_id = a.apple_id AND
),
'%c/%e/%y'
) AS next_due,
IF(
(
SELECT MIN(date_effective)
FROM barn_schedule evs
WHERE
evs.apple_id = a.apple_id AND
) IN ('2012-
a.is_react = 'no',
1,
0
) first_seeds,
IF(
IF(
(
SELECT
SUM(
IF(
tr.amount
)
)
FROM
LEFT JOIN festival_register tr USING (barn_schedule_id)
WHERE
es.apple_id = a.apple_id AND
(
)
AND
es.context != 'cancel'
) <= 0 AND a.apple_status_id NOT IN (124,19),
1,
0
) payout,
IF(
COUNT(
1,
0
) cancel,
SUM(IF(
eat.name_short = 'watermelon',
ea.amount,
0
)) tomato,
SUM(IF(
eat.name_short = 'peach',
ea.amount,
0
)) peach,
SUM(IF(
eat.name_short = 'grape',
ea.amount,
0
)) grape,
SUM(IF(
eat.name_short <> 'blackberry',
ea.amount,
0
)) AS amount_due
FROM
barn_schedule es
JOIN company c USING (company_id)
JOIN barn_type et USING (barn_type_id)
JOIN barn_amount ea USING (barn_schedule_id)
JOIN barn_amount_type eat USING (barn_amount_
LEFT JOIN festival_register tr USING(barn_
JOIN apple a ON es.apple_id = a.apple_id
JOIN apple_status ass USING (apple_status_id)
JOIN fresh_type lt USING (fresh_type_id)
LEFT JOIN (
apple_language al
JOIN language USING (language_id)
) ON (
al.apple_id = a.apple_id
AND al.date_created < DATE_ADD(
)
LEFT JOIN apple_language al_check ON (
al_
AND al_check.
AND al_check.
)
WHERE
(
tr.
tr.
) AND
es.barn_type_id IN (
SELECT et.barn_type_id
FROM
barn_type et
JOIN barn_festival USING (barn_type_id)
JOIN festival_type USING (festival_type_id)
WHERE
clearing_type <> 'honey'
AND et.name_short NOT IN ('count_internal',
) AND
(
-- Date Effective equals Specific
es.
(
-- Date Effective was previous day, scheduled after DCR was run
es.
es.
)
) AND
es.company_id IN ('6') AND
es.barn_status <> 'suspended' AND
(tr.
lt.name_short IN ('standard'
es.
es.
a.apple_
(et.name <> 'Cancel' OR es.amount_
AND al_check.
How to re-create
1) Load empty schema (does not matter if schema is empty but easier to use empty schema)
2) Run above query
# Schema
--
-- Table structure for table `apple`
--
DROP TABLE IF EXISTS `apple`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `apple` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`apple_id` int(10) unsigned NOT NULL DEFAULT '0',
`customer_id` int(10) unsigned NOT NULL DEFAULT '0',
`archive_
`login_id` int(10) unsigned DEFAULT NULL,
`is_react` enum('no','yes') NOT NULL,
`fresh_type_id` int(10) unsigned NOT NULL DEFAULT '0',
`rule_set_id` int(10) unsigned DEFAULT NULL,
`enterprise_
`apple_status_id` int(10) unsigned NOT NULL DEFAULT '0',
`date_
`date_
`ip_address` varchar(40) NOT NULL DEFAULT '',
`apple_type` enum('paperless
`charity_name` varchar(100) NOT NULL DEFAULT '',
`charity_aba` varchar(9) NOT NULL DEFAULT '',
`charity_account` varchar(24) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`charity_
`charity_
`date_
`date_
`date_
`crop_requested` decimal(7,2) DEFAULT NULL,
`crop_qualified` decimal(7,2) NOT NULL DEFAULT '0.00',
`crop_actual` decimal(7,2) DEFAULT NULL,
`corn_charge` decimal(7,2) DEFAULT NULL,
`seeds_total` decimal(7,2) DEFAULT NULL,
`bean` decimal(9,4) DEFAULT NULL,
`water_monthly` decimal(7,2) NOT NULL DEFAULT '0.00',
`water_source` enum('sprinkler
`water_
`water_frequency` enum('weekly'
`water_
`water_
`seed_date_model` enum('dw'
`day_of_week` enum('sun'
`weekend_
`holiday_
`last_seed_date` date DEFAULT NULL,
`day_of_month_1` tinyint(3) unsigned DEFAULT NULL,
`day_of_month_2` tinyint(3) unsigned DEFAULT NULL,
`week_1` tinyint(3) unsigned DEFAULT NULL,
`week_2` tinyint(3) unsigned DEFAULT NULL,
`track_id` varchar(40) DEFAULT NULL,
`agent_id` int(10) unsigned DEFAULT NULL,
`agent_
`dob` varchar(16) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '0000-00-00',
`dob_oldkey` varchar(16) DEFAULT NULL,
`age` tinyint(3) unsigned NOT NULL DEFAULT '0',
`ffn_id` int(10) unsigned DEFAULT NULL,
`ffn` varchar(12) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
`ffn_oldkey` varchar(12) DEFAULT NULL,
`farmer_
`farmer_
`farmer_id_state` char(2) DEFAULT NULL,
`farmer_id_type` enum('dl'
`pitchfork_
`email` varchar(100) NOT NULL DEFAULT '',
`email_verified` enum('unverifie
`name_title` varchar(10) DEFAULT NULL,
`name_last` varchar(50) NOT NULL DEFAULT '',
`name_first` varchar(50) NOT NULL DEFAULT '',
`name_nick` varchar(50) DEFAULT NULL,
`name_middle` varchar(50) DEFAULT NULL,
`name_suffix` varchar(20) DEFAULT NULL,
`street` varchar(100) NOT NULL DEFAULT '',
`unit` varchar(10) DEFAULT NULL,
`city` varchar(30) NOT NULL DEFAULT '',
`state` char(2) NOT NULL DEFAULT '',
`zip_code` varchar(9) NOT NULL DEFAULT '',
`tenancy_type` enum('unspecifi
`phone_home` varchar(10) NOT NULL DEFAULT '',
`phone_cell` varchar(10) DEFAULT NULL,
`phone_fax` varchar(10) DEFAULT NULL,
`call_time_pref` enum('no preference'
`contact_
`marketing_
`department` varchar(100) NOT NULL,
`shift` enum('day'
`date_hire` datetime DEFAULT NULL,
`job_tenure` decimal(4,2) DEFAULT NULL,
`phone_work` varchar(10) DEFAULT NULL,
`phone_work_ext` varchar(8) DEFAULT NULL,
`work_address_1` varchar(50) DEFAULT NULL,
`work_address_2` varchar(50) DEFAULT NULL,
`work_city` varchar(30) DEFAULT NULL,
`work_state` char(2) DEFAULT NULL,
`work_zip_code` varchar(9) DEFAULT NULL,
`sprinkler_
`pwadvid` varchar(40) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
`bat_process` varchar(255) NOT NULL DEFAULT 'email_
`is_watched` enum('no','yes') NOT NULL,
`schedule_
`modifying_
`version` smallint(6) NOT NULL DEFAULT '1',
`pickle_key_id` int(10) unsigned DEFAULT NULL,
`phone_
`email_
`contactable` bit(1) NOT NULL DEFAULT b'1',
`is_friends` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`apple_id`),
UNIQUE KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_login_app` (`login_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_app_
KEY `idx_date_created` (`date_created`),
KEY `idx_phone_cell` (`phone_cell`(6)),
KEY `idx_track_id` (`track_id`(6)),
KEY `idx_bat_process` (`bat_process`(5)),
KEY `idx_phone_home` (`phone_home`(6)),
KEY `idx_farmer_
KEY `idx_app_
KEY `idx_ip_address` (`ip_address`),
KEY `idx_app_
KEY `idx_app_
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `apple_status`
--
DROP TABLE IF EXISTS `apple_status`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `apple_status` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`apple_status_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`name_short` varchar(25) NOT NULL DEFAULT '',
`apple_
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`apple_
UNIQUE KEY `idx_appsts_
) ENGINE=InnoDB AUTO_INCREMENT=158 DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `apple_language`
--
DROP TABLE IF EXISTS `apple_language`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `apple_language` (
`apple_
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`apple_id` int(10) unsigned NOT NULL,
`language_id` int(10) unsigned NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`original` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`apple_
KEY `idx_apple_id` (`apple_id`)
) ENGINE=InnoDB AUTO_INCREMENT=
/*!40101 SET character_
--
-- Table structure for table `company`
--
DROP TABLE IF EXISTS `company`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `company` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`company_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`name_short` varchar(5) NOT NULL DEFAULT '',
`co_entity_type` enum('pseudo'
`ecash_
`property_id` int(10) unsigned NOT NULL DEFAULT '0',
`is_db_owner` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`company_id`),
UNIQUE KEY `idx_company_
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `barn_schedule`
--
DROP TABLE IF EXISTS `barn_schedule`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `barn_schedule` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`apple_id` int(10) unsigned NOT NULL DEFAULT '0',
`barn_
`barn_type_id` int(10) unsigned NOT NULL DEFAULT '0',
`origin_id` int(10) unsigned DEFAULT NULL,
`origin_group_id` int(11) DEFAULT NULL,
`configuratio
`amount_tomato` decimal(7,2) NOT NULL DEFAULT '0.00',
`amount_
`barn_status` enum('scheduled
`date_barn` date NOT NULL DEFAULT '0000-00-00',
`date_effective` date NOT NULL DEFAULT '0000-00-00',
`context` enum('arrangeme
`source_id` int(10) unsigned NOT NULL DEFAULT '4',
`is_shifted` tinyint(3) unsigned NOT NULL DEFAULT '0',
`extension` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
) ENGINE=InnoDB AUTO_INCREMENT=
/*!40101 SET character_
--
-- Table structure for table `barn_type`
--
DROP TABLE IF EXISTS `barn_type`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `barn_type` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`barn_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name_short` varchar(25) NOT NULL DEFAULT '',
`name` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`barn_type_id`),
UNIQUE KEY `idx_barn_
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `barn_festival`
--
DROP TABLE IF EXISTS `barn_festival`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `barn_festival` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`barn_type_id` int(10) unsigned NOT NULL DEFAULT '0',
`festival_
`distribution
`distribution
`spawn_
`spawn_amount` decimal(7,2) DEFAULT NULL,
`spawn_max_num` tinyint(3) unsigned DEFAULT NULL,
PRIMARY KEY (`barn_
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `barn_amount`
--
DROP TABLE IF EXISTS `barn_amount`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `barn_amount` (
`barn_amount_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`barn_
`festival_
`barn_
`amount` decimal(7,2) NOT NULL DEFAULT '0.00',
`apple_id` int(10) unsigned NOT NULL DEFAULT '0',
`num_reattempt` int(10) unsigned NOT NULL DEFAULT '0',
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`barn_amount_id`),
KEY `idx_barn_
KEY `idx_barn_
KEY `idx_barn_
) ENGINE=InnoDB AUTO_INCREMENT=
/*!40101 SET character_
--
-- Table structure for table `barn_amount_type`
--
DROP TABLE IF EXISTS `barn_amount_type`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `barn_amount_type` (
`barn_
`name_short` varchar(255) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`barn_
UNIQUE KEY `name_short` (`name_short`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COMMENT='REFERENCE TABLE: The different types of dollar amount';
/*!40101 SET character_
--
-- Table structure for table `fresh_type`
--
DROP TABLE IF EXISTS `fresh_type`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `fresh_type` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`fresh_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '',
`name_short` varchar(25) NOT NULL DEFAULT '',
PRIMARY KEY (`fresh_type_id`),
UNIQUE KEY `idx_fresh_
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `language`
--
DROP TABLE IF EXISTS `language`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `language` (
`language_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`name` varchar(100) NOT NULL,
`name_short` varchar(10) NOT NULL,
`redirect_domain` varchar(100) NOT NULL,
PRIMARY KEY (`language_id`),
UNIQUE KEY `idx_name_short` (`name_short`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_
--
-- Table structure for table `festival_register`
--
DROP TABLE IF EXISTS `festival_
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `festival_register` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`apple_id` int(10) unsigned NOT NULL DEFAULT '0',
`festival_
`barn_
`honey_id` int(10) unsigned DEFAULT NULL,
`ecld_id` int(10) unsigned DEFAULT NULL,
`festival_
`festival_status` enum('new'
`amount` decimal(7,2) NOT NULL DEFAULT '0.00',
`date_effective` date NOT NULL DEFAULT '0000-00-00',
`source_id` int(10) unsigned NOT NULL DEFAULT '4',
`modifying_
`invalid` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`festival_
KEY `idx_trans_
KEY `idx_trans_
KEY `idx_trans_
KEY `idx_trans_
KEY `idx_trans_
KEY `idx_trans_
KEY `idx_trans_
) ENGINE=InnoDB AUTO_INCREMENT=
/*!40101 SET character_
--
-- Table structure for table `festival_type`
--
DROP TABLE IF EXISTS `festival_type`;
/*!40101 SET @saved_cs_client = @@character_
/*!40101 SET character_
CREATE TABLE `festival_type` (
`date_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`date_created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`active_status` enum('active'
`company_id` int(10) unsigned NOT NULL DEFAULT '0',
`festival_
`name_short` varchar(25) NOT NULL DEFAULT '',
`name` varchar(100) NOT NULL DEFAULT '',
`clearing_type` enum('honey'
`affects_tomato` enum('no','yes') NOT NULL DEFAULT 'no',
`pending_period` int(10) unsigned NOT NULL,
`end_status` enum('complete'
`period_type` enum('business'
PRIMARY KEY (`festival_
UNIQUE KEY `idx_trans_
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=latin1;
# From error log
120501 9:59:10 Percona XtraDB (http://
120501 9:59:10 [Note] ./bin/mysqld: ready for connections.
Version: '5.3.6-MariaDB-log' socket: '/san/ecashamg/
120501 9:59:20 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see http://
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 5.3.6-MariaDB-log
key_buffer_
read_buffer_
max_used_
max_threads=501
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x0x12228f80
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f629328ae98 thread_stack 0x48000
./bin/mysqld(
./bin/mysqld(
/lib/libpthread
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld() [0x647a2e]
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
./bin/mysqld(
/lib/libpthread
/lib/libc.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x1223b8d8): SELECT
DATE_FORMAT(
(
SELECT MIN(date_effective)
FROM barn_schedule ees
WHERE
ees.apple_id = a.apple_id AND
),
'%c/%e/%y'
) AS next_due,
IF(
(
SELECT MIN(date_effective)
FROM barn_schedule evs
WHERE
evs.apple_id = a.apple_id AND
) IN ('2012-
a.is_react = 'no',
1,
0
) first_seeds,
IF(
IF(
(
SELECT
SUM(
IF(
tr.amount
)
)
FROM
LEFT JOIN festival_register tr USING (barn_schedule_id)
WHERE
es.apple_id = a.apple_id AND
(
)
AND
es.context != 'cancel'
) <= 0 AND a.apple_status_id NOT IN (124,19),
1,
0
) payout,
IF(
COUNT(
1,
0
) cancel,
SUM(IF(
eat.name_short = 'watermelon',
ea.amount,
0
)) tomato,
SUM(IF(
eat.name_short = 'peach',
ea.amount,
0
)) peach,
SUM(IF(
eat.name_short = 'grape',
ea.amount,
0
)) grape,
SUM(IF(
eat.name_short <> 'blackberry',
ea.amount,
0
)) AS amount_due
FROM
barn_schedule es
JOIN company c USING (company_id)
JOIN barn_type et USING (barn_type_id)
JOIN barn_amount ea USING (barn_schedule_id)
JOIN barn_amount_type eat USING (barn_amount_
LEFT JOIN festival_register tr USING(barn_
JOIN apple a ON es.apple_id = a.apple_id
JOIN apple_status ass USING (apple_status_id)
JOIN fresh_type lt USING (fresh_type_id)
LEFT JOIN (
apple_language al
JOIN language USING (language_id)
) ON (
al.apple_id = a.apple_id
AND al.date_created < DATE_ADD(
)
LEFT JOIN apple_language al_check ON (
al_
AND al_check.
AND al_check.
)
WHERE
(
tr.
tr.
) AND
es.barn_type_id IN (
SELECT et.barn_type_id
FROM
barn_type et
JOIN barn_festival USING (barn_type_id)
JOIN festival_type USING (festival_type_id)
WHERE
clearing_type <> 'honey'
AND et.name_short NOT IN ('count_internal',
) AND
(
es.
(
es.
es.
)
) AND
es.company_id IN ('6') AND
es.barn_status <> 'suspended' AND
(tr.
lt.name_short IN ('standard'
es.
es.
a.apple_
(et.name <> 'Cancel' OR es.amount_
AND al_check.
Connection ID (thread ID): 2
Status: NOT_KILLED
Optimizer switch: index_merge=
The manual page at http://
information that should help you find out what is causing the crash.
120501 09:59:20 mysqld_safe Number of processes running now: 0
120501 09:59:20 mysqld_safe mysqld restarted
Related branches
Changed in maria: | |
importance: | High → Critical |
milestone: | none → 5.3 |
Changed in maria: | |
status: | New → Fix Committed |
Thank you for the report.
# Simplified test case:
DROP TABLE IF EXISTS t1; 04-25', '2012-04- 26');
CREATE TABLE t1 ( a DATE );
SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012-
# End of test case
Reproducible on the current maria-5.3 tree (revno 3510).
Reproducible with the default optimizer_switch, as well as with all OFF values.
Could not reproduce on maria-5.1, maria-5.2, maria-5.5, mysql-5.5, mysql-trunk.
#3 <signal handler called> 0x7fb02c5d60f0, 0x7fb02c5d60ef) at item_cmpfunc.cc:877 cc:3455 in::fix_ length_ and_dec (this=0x1cb18a0) cc:3958 :fix_fields (this=0x1cb18a0, thd=0x1c2b9a8, in::fix_ fields (this=0x1cb18a0, thd=0x1c2b9a8, cc:3776 0x1cb1e60) at sql_base.cc:8502 pointer_ array=0x1cb20a0 , tables=0x1cb0398, leaves=..., fields=..., group_fields= 0x1cb1d57) at sql_select.cc:519 array=0x1c2e5e8 , init=0x1cb0398, wild_num=1, conds_init= 0x1cb18a0, og_num=0, order_init=0x0, init=0x0, select_ lex_arg= 0x1c2e398, arg=0x1c2de90) at sql_select.cc:667 array=0x1c2e5e8 , 0x1cb0398, wild_num=1, fields=..., conds=0x1cb18a0, og_num=0, order=0x0, options= 2147764736, result=0x1cb1a68, lex=0x1c2e398) at sql_select.cc:2932 0x1cb1a68, setup_tables_ done_option= 0) at sql_select.cc:285 sqlcom_ select (thd=0x1c2b9a8, all_tables= 0x1cb0398) command (thd=0x1c2b9a8) at sql_parse.cc:2284 0x1cb0140 "SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012- 04-25', '2012-04- 26')", length=74, found_semicolon =0x7fb02c5d7c98 ) at sql_parse.cc:6152 0x1ca6c89 "SELECT * FROM t1 WHERE ( SELECT a FROM t1 ) IN ('2012- 04-25', '2012-04- 26')", packet_length=74) at sql_parse.cc:1228 one_connection (arg=0x1c2b9a8) at sql_connect.cc:1218 libpthread. so.0
#4 0x00000000006388fb in get_datetime_value (thd=0x1c2b9a8, item_arg=
cache_arg=0x0, warn_item=0x0, is_null=
#5 0x00000000006413f2 in in_datetime::set (this=0x1cde590, pos=0, item=0x1cb16e8)
at item_cmpfunc.
#6 0x0000000000642fa8 in Item_func_
at item_cmpfunc.
#7 0x000000000061cc1d in Item_func:
ref=0x1cb1e60) at item_func.cc:207
#8 0x00000000006424cb in Item_func_
ref=0x1cb1e60) at item_cmpfunc.
#9 0x000000000075b1c1 in setup_conds (thd=0x1c2b9a8, tables=0x1cb0398, leaves=...,
conds=
#10 0x00000000007ad527 in setup_without_group (thd=0x1c2b9a8,
ref_
all_fields=..., conds=0x1cb1e60, order=0x0, group=0x0,
hidden_
#11 0x0000000000771447 in JOIN::prepare (this=0x1cb1a88, rref_pointer_
tables_
group_init=0x0, having_init=0x0, proc_param_
unit_
#12 0x0000000000779b83 in mysql_select (thd=0x1c2b9a8, rref_pointer_
tables=
group=0x0, having=0x0, proc_param=0x0, select_
unit=0x1c2de90, select_
#13 0x0000000000770801 in handle_select (thd=0x1c2b9a8, lex=0x1c2ddf0,
result=
#14 0x00000000006feecc in execute_
at sql_parse.cc:5151
#15 0x00000000006f5f89 in mysql_execute_
#16 0x00000000007018a7 in mysql_parse (thd=0x1c2b9a8,
rawbuf=
#17 0x00000000006f3738 in dispatch_command (command=COM_QUERY, thd=0x1c2b9a8,
packet=
#18 0x00000000006f2a6c in do_command (thd=0x1c2b9a8) at sql_parse.cc:923
#19 0x00000000006ef8ba in handle_
#20 0x00007fb035d75a4f in start_thread () from /lib64/
#21 0x00007fb03515f82d in clone () from /lib64/libc.so.6