Bug #42897 Print to Screen Errors from Select in cmd
| Submitted: | 16 Feb 2009 17:54 | Modified: | 20 Mar 2009 6:39 |
|---|---|---|---|
| Reporter: | Edward Strinden | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
| Version: | 4.1, 5.0, 5,1, 6.0 bzr | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | cmd, columns, layout, print | ||
[16 Feb 2009 17:54]
Edward Strinden
[17 Feb 2009 8:05]
Sveta Smirnova
Thank you for the report. Please provide output of SHOW CREATE TABLE event and dump of its content.
[17 Feb 2009 15:52]
Edward Strinden
Dump of show create table event; show create table event\G:
mysql> use menagerie;
Database changed
mysql> show create table event;
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------------------------------------+
| Table | Create Table
|
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------------------------------------+
| event | CREATE TABLE `event` (
`name` varchar(20) DEFAULT NULL,
`date` date DEFAULT NULL,
`type` varchar(15) DEFAULT NULL,
`remark` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+-----------------------------------------------------------------------
--------------------------------------------------------------------------------
-----------------------------------------------+
1 row in set (0.11 sec)
mysql> show create table event\G;
*************************** 1. row ***************************
Table: event
Create Table: CREATE TABLE `event` (
`name` varchar(20) DEFAULT NULL,
`date` date DEFAULT NULL,
`type` varchar(15) DEFAULT NULL,
`remark` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
ERROR:
No query specified
mysql>
[17 Feb 2009 21:37]
Sveta Smirnova
Thank you for the feedback. Please send dump of event table - output of `mysqldump dbname event`: if I understood correctly you complain about formatting errors, so I want to be sure table does not contain unnecessary tabulations, linebreaks or other special symbols.
[18 Mar 2009 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[18 Mar 2009 15:11]
Edward Strinden
Output of mysqldump
C:\WINDOWS>mysqldump menagerie event -u root -p
Enter password: **************
-- MySQL dump 10.13 Distrib 5.1.31, for Win32 (ia32)
--
-- Host: localhost Database: menagerie
-- ------------------------------------------------------
-- Server version 5.1.31-community
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `event`
--
DROP TABLE IF EXISTS `event`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `event` (
`name` varchar(20) DEFAULT NULL,
`date` date DEFAULT NULL,
`type` varchar(15) DEFAULT NULL,
`remark` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `event`
--
LOCK TABLES `event` WRITE;
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
INSERT INTO `event` VALUES ('Fluffy','1995-05-15','litter','4 kittens, 3 female,
1 male\r'),('Buffy','1993-06-23','litter','5 puppies, 2 female, 3 male\r'),('Bu
ffy','1994-06-19','litter','3 puppies, 3 female\r'),('Chirpy','1999-03-21','vet'
,'needed beak straightened\r'),('Slim','1997-08-03','vet','broken rib\r'),('Bows
er','1991-10-12','kennel','\r'),('Fang','1991-10-12','kennel','\r'),('Fang','199
8-08-28','birthday','Gave him a new chew toy\r'),('Claws','1998-03-17','birthday
','Gave him a new flea collar\r'),('Whistler','1998-12-09','birthday','First bir
thday');
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2009-03-18 13:44:03
[19 Mar 2009 6:16]
Sveta Smirnova
Thank you for the report. Verified as described.
[19 Mar 2009 22:23]
Jim Winstead
Your data contains carriage return characters (the "\r" you can see in the dump), which will result in the sort of output you see.
[20 Mar 2009 6:24]
Sveta Smirnova
Jim,
right. But please look attention problem is not formatting, but no value in `name` field displayed. Or only part of such value.For example I expect
mysql> select * from event limit 1;
+--------+------------+--------+------------------------------+
| name | date | type | remark |
+--------+------------+--------+------------------------------+
| Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
+--------+------------+--------+------------------------------+
1 row in set (0.00 sec)
but get:
mysql> select * from event limit 1;
+--------+------------+--------+------------------------------+
| name | date | type | remark |
+--------+------------+--------+------------------------------+
| luffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
+--------+------------+--------+------------------------------+
1 row in set (0.00 sec)
or I expect:
mysql> select * from event limit 3;
+--------+------------+--------+------------------------------+
| name | date | type | remark |
+--------+------------+--------+------------------------------+
| Fluffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
| Buffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male
| Buffy | 1994-06-19 | litter | 3 puppies, 3 female
+--------+------------+--------+------------------------------+
3 rows in set (0.00 sec)
but get:
mysql> select * from event limit 3;
+--------+------------+--------+------------------------------+
| name | date | type | remark |
+--------+------------+--------+------------------------------+
| luffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male
| uffy | 1993-06-23 | litter | 5 puppies, 2 female, 3 male
| 1994-06-19 | litter | 3 puppies, 3 female
+--------+------------+--------+------------------------------+
3 rows in set (0.00 sec)
[20 Mar 2009 6:39]
Sveta Smirnova
Probably mysql> select * from event limit 1; +--------+------------+--------+------------------------------+ | name | date | type | remark | +--------+------------+--------+------------------------------+ | luffy | 1995-05-15 | litter | 4 kittens, 3 female, 1 male +--------+------------+--------+------------------------------+ 1 row in set (0.00 sec) is correct, but why no value in `name` field displayed since line 3 while value in the `remark` field still contains single '\r'?
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.045 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.