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

Field type year should have unsigned flag #4830

Closed
jackysp opened this issue Oct 19, 2017 · 0 comments · Fixed by #4832
Closed

Field type year should have unsigned flag #4830

jackysp opened this issue Oct 19, 2017 · 0 comments · Fixed by #4832
Assignees

Comments

@jackysp
Copy link
Member

jackysp commented Oct 19, 2017

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
drop table if exists t;
create table t (
	c_year year
);

insert into t values (
	11
);

select * from t;
  1. What did you expect to see?
Field   1:  `c_year`
Catalog:    `def`
Database:   `mysql`
Table:      `t`
Org_table:  `t`
Type:       YEAR
Collation:  binary (63)
Length:     4
Max_length: 4
Decimals:   0
Flags:      UNSIGNED ZEROFILL NUM 


+--------+
| c_year |
+--------+
|   2011 |
+--------+
1 row in set (0.00 sec)
  1. What did you see instead?
Field   1:  `c_year`
Catalog:    `def`
Database:   `test`
Table:      `t`
Org_table:  `t`
Type:       YEAR
Collation:  binary (63)
Length:     16
Max_length: 4
Decimals:   0
Flags:      BINARY NUM 


+--------+
| c_year |
+--------+
|   2011 |
+--------+
1 row in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V)?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant