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

Function default not supported #4054

Closed
jackysp opened this issue Aug 7, 2017 · 1 comment
Closed

Function default not supported #4054

jackysp opened this issue Aug 7, 2017 · 1 comment
Assignees

Comments

@jackysp
Copy link
Member

jackysp commented Aug 7, 2017

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14');
select default(str), default(strnull), default(intg), default(rel) from t1;
  1. What did you expect to see?
mysql> select default(str), default(strnull), default(intg), default(rel) from t1;
Empty set (0.00 sec)
  1. What did you see instead?
ERROR 1105 (HY000) at line 2: UnknownType: *ast.DefaultExpr
  1. What version of TiDB are you using (tidb-server -V)?
@jackysp jackysp added rc3.1 type/compatibility help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed easy help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 7, 2017
@jackysp jackysp self-assigned this Aug 8, 2017
@ngaut ngaut removed the rc3.1 label Aug 16, 2017
@morgo
Copy link
Contributor

morgo commented Nov 24, 2018

Confirming that I can still reproduce this:

tidb> create table t1(str varchar(10) default 'def',strnull varchar(10),intg int default '10',rel double default '3.14');
Query OK, 0 rows affected (0.01 sec)

tidb> select default(str), default(strnull), default(intg), default(rel) from t1;
ERROR 1105 (HY000): UnknownType: *ast.DefaultExpr
tidb> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-rc.3-219-g1e0876fe8-dirty
Git Commit Hash: 1e0876fe810a832721aac52275dd2b7792fd2892
Git Branch: flush
UTC Build Time: 2018-11-24 01:12:47
GoVersion: go version go1.11 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.00 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants