Incorrect handling of NULL with non-default escape character in cpimport

Bug #1025347 reported by Christoffer Sawicki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
InfiniDB Community
Confirmed
Undecided
Unassigned

Bug Description

# How to reproduce

1. SELECT NULL INTO OUTFILE 'examples.tbl' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY 'X';

2. CREATE TABLE examples (example varchar(24)) ENGINE=InfiniDB;

3. /usr/local/Calpont/bin/cpimport test examples -s , -E \" -C X /usr/local/Calpont/mysql/db/test/examples.tbl

4. SELECT * FROM examples

# Expected result

+---------+
| example |
+---------+
| NULL |
+---------+

# Actual result

+---------+
| example |
+---------+
| XN |
+---------+

# Explanation

cpimport doesn't interpret XN as NULL even though the escape character is set to X. (The behaviour is correct if the escape character is \.)

Changed in infinidb:
status: New → Confirmed
Revision history for this message
Robert Adams (radams-calpont) wrote :

For anyone following this issue, please note the steps to reproduce should read 'examples.tbl'

1. SELECT NULL INTO OUTFILE 'examples.tbl' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY 'X';

It is also recommended to not put InfiniDB tables in the test schema. (Please refer to the Syntax Guide)

Calpont InfiniDB tables should not be created in the mysql, information_schema or test databases.

Revision history for this message
Christoffer Sawicki (qerub) wrote :

Sorry about the incorrect filename (I've changed it now) and for using the test database (for this test). And thanks a lot for looking into this!

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.