Column order in employees.dept_manager is incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Sample database with test suite |
Fix Committed
|
Medium
|
Giuseppe Maxia |
Bug Description
CREATE TABLE `dept_manager` (
`dept_no` char(4) NOT NULL,
`emp_no` int(11) NOT NULL,
`from_date` date NOT NULL,
`to_date` date NOT NULL,
PRIMARY KEY (`emp_no`
KEY `emp_no` (`emp_no`),
KEY `dept_no` (`dept_no`),
CONSTRAINT `dept_manager_
CONSTRAINT `dept_manager_
) ENGINE=InnoDB DEFAULT CHARSET=latin1
Since this is an InnoDB table, it reorders columns by compound PRIMARY KEY order; thus, emp_no should be first, dept_no second.
Why would anyone care? Because of EXPORT; LOAD DATA INFILE;
This assume the ordering of data is according to internal column order; alas - it is mixed.
Recommend: alter table, reorder columns.
Changed in test-db: | |
status: | Incomplete → Fix Committed |
Thanks for your bug report. Will do some benchmarks to confirm the issue and act accordingly