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

Error executing query with varchar column #5111

Closed
Novemser opened this issue Nov 15, 2017 · 1 comment · Fixed by #5130
Closed

Error executing query with varchar column #5111

Novemser opened this issue Nov 15, 2017 · 1 comment · Fixed by #5130
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@Novemser
Copy link

Novemser commented Nov 15, 2017

  1. What did you do?
    mysql:
mysql> select count(1) from full_data_type_table  where tp_varchar < 1;
ERROR 1105 (HY000): strconv.ParseFloat: parsing "1e649": value out of range

mysql> show create table full_data_type_table;
| full_data_type_table | CREATE TABLE `full_data_type_table` (
  `id_dt` int(11) NOT NULL,
  `tp_varchar` varchar(45) DEFAULT NULL,
  `tp_datetime` datetime DEFAULT CURRENT_TIMESTAMP,
  `tp_blob` blob DEFAULT NULL,
  `tp_binary` binary(2) DEFAULT NULL,
  `tp_date` date DEFAULT NULL,
  `tp_timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
  `tp_year` year DEFAULT NULL,
  `tp_bigint` bigint(20) DEFAULT NULL,
  `tp_decimal` decimal DEFAULT NULL,
  `tp_double` double DEFAULT NULL,
  `tp_float` float DEFAULT NULL,
  `tp_int` int(11) DEFAULT NULL,
  `tp_mediumint` mediumint(9) DEFAULT NULL,
  `tp_real` double DEFAULT NULL,
  `tp_smallint` smallint(6) DEFAULT NULL,
  `tp_tinyint` tinyint(4) DEFAULT NULL,
  `tp_char` char(10) DEFAULT NULL,
  `tp_nvarchar` varchar(40) DEFAULT NULL,
  `tp_longtext` longtext DEFAULT NULL,
  `tp_mediumtext` mediumtext DEFAULT NULL,
  `tp_text` text DEFAULT NULL,
  `tp_tinytext` tinytext DEFAULT NULL,
  `tp_bit` bit(1) DEFAULT NULL,
  `tp_time` time DEFAULT NULL,
  `tp_enum` enum('1','2','3','4') DEFAULT NULL,
  `tp_set` set('a','b','c','d') DEFAULT NULL,
  PRIMARY KEY (`id_dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
  1. What did you expect to see?
    Something like:
+----------+
| count(1) |
+----------+
|        0 |
+----------+
  1. What did you see instead?
ERROR 1105 (HY000): strconv.ParseFloat: parsing "1e649": value out of range
  1. What version of TiDB are you using (tidb-server -V)?
Release Version: v1.1.0-alpha-89-g7fd147b
Git Commit Hash: 7fd147bc57f3025c734a7b59edd06530419a604c
Git Commit Branch: master
UTC Build Time:  2017-11-14 03:49:43
@winoros winoros added the type/bug The issue is confirmed as a bug. label Nov 15, 2017
@mccxj
Copy link
Contributor

mccxj commented Nov 15, 2017

more info.

insert into full_data_type_table(id_dt, tp_varchar) values(1, '1e649');

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

Successfully merging a pull request may close this issue.

3 participants