Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpp query hangs if TiFlash meet some error for complex sql #1529

Closed
windtalker opened this issue Mar 9, 2021 · 0 comments · Fixed by #1533
Closed

mpp query hangs if TiFlash meet some error for complex sql #1529

windtalker opened this issue Mar 9, 2021 · 0 comments · Fixed by #1533
Labels
severity/critical type/bug The issue is confirmed as a bug.

Comments

@windtalker
Copy link
Contributor

mysql> show create table aa;
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| AA    | CREATE TABLE `AA` (
  `col_decimal_not_null` decimal(10,0) NOT NULL,
  `pk` int(11) NOT NULL AUTO_INCREMENT,
  `col_varchar_10` varchar(10) DEFAULT NULL,
  `col_datetime` datetime DEFAULT NULL,
  `col_decimal` decimal(10,0) DEFAULT NULL,
  `col_varchar_10_not_null` varchar(10) NOT NULL,
  `col_datetime_not_null` datetime NOT NULL,
  `col_int` int(11) DEFAULT NULL,
  `col_int_not_null` int(11) NOT NULL,
  PRIMARY KEY (`pk`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=2000001 |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

mysql> SELECT SUM( OUTR . col2 ) AS X FROM (SELECT INNR . `pk` + 1 as col1, INNR . `col_datetime` as col2 FROM AA AS INNR) AS OUTR2 INNER JOIN (SELECT INNR . `col_int` + 1 as col1, INNR . `col_varchar_10` as col2 FROM AA AS INNR) AS OUTR ON OUTR2.col1 = OUTR.col1 GROUP
BY OUTR . col2, OUTR2 . col1;
ERROR 1105 (HY000): DB::Exception: Illegal type String of argument for aggregate function sum

Seems the last sql will hangs forever unless I kill the tidb connection in another tidb session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants