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

select into outfile time1 year(4) default '2030', Inconsistent data 「tidb 4.0.9 vs mysql 5.7」 #22159

Closed
buggithubs opened this issue Jan 4, 2021 · 5 comments · Fixed by #22175
Assignees
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@buggithubs
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table tm1(time1 year(4) default '2030');

insert into tm1 values(2010);
insert into tm1 values(2011);
insert into tm1 values(2012);

select * from tm1;
+-------+
| time1 |
+-------+
|  2010 |
|  2011 |
|  2012 |
+-------+
3 rows in set (0.00 sec)

2. What did you expect to see? (Required)

MySQL

MySQL [test]> select * from tm1 into outfile '/var/lib/mysql-files/tm1' fields terminated by ',' optionally enclosed by '=' lines terminated by '\n';
Query OK, 3 rows affected (0.00 sec)

[root@101 mysql-files]# cat tm1 
2010
2011
2012
[root@101 mysql-files]#

3. What did you see instead (Required)

TiDB

MySQL [out]> select * from tm1 into outfile '/opt/t100/tm1' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';
Query OK, 0 rows affected (0.00 sec)

// Print three line space
[root@101 t100]# cat tm1 



[root@101 t100]# 

4. What is your TiDB version? (Required)

TiDB 4.0.9

@buggithubs buggithubs added the type/bug The issue is confirmed as a bug. label Jan 4, 2021
@xiongjiwei
Copy link
Contributor

/assign

@ti-srebot
Copy link
Contributor

ti-srebot commented Jan 5, 2021

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

[v4.0.6:v4.0.10],[v5.0.0-rc]

6. Fixed versions

master

@ti-srebot
Copy link
Contributor

( component or sig(label) ) fields are empty.

@seiya-annie
Copy link

seiya-annie commented Jan 29, 2021

imported by #19438 in v5.0.0-rc

@seiya-annie seiya-annie added the sig/execution SIG execution label Jan 29, 2021
@seiya-annie
Copy link

cherry-pick to 4.0.6 with " executor: fix the issue that SELECT ... INTO OUTFILE returns runtime error (#19438) (#19672)\n",
" v4.0.6",

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

Successfully merging a pull request may close this issue.

5 participants