List:General Discussion« Previous MessageNext Message »
From:martin Date:September 19 2000 11:29am
Subject:[mysqldump dumps some enum fields without '']
View as plain text  
>Description:
mysqldump --add-drop-table --delayed-insert --flush-logs Shop OrderLog
produces the following:

DROP TABLE IF EXISTS OrderLog;
CREATE TABLE OrderLog (
  order_id int(11) unsigned NOT NULL auto_increment,
  shop_id int(10) unsigned DEFAULT '0' NOT NULL,
  customer_id int(10) unsigned,
  shipping_id int(10) unsigned,
  payment_id int(10) unsigned,
  shippinglocation_id int(11) DEFAULT '0' NOT NULL,
  Changed timestamp(14),
  orderno int(11) DEFAULT '0' NOT NULL,
  extra_message text,
  email_copy text,
  unique_id varchar(20),
  confirm varchar(10),
  marking varchar(50),
  littera varchar(50),
  shipdate date,
  orderedby varchar(32),
  ship_price float(8,2) DEFAULT '0.00' NOT NULL,
  ship_tax float(8,2) DEFAULT '0.00' NOT NULL,
  pay_price float(8,2) DEFAULT '0.00' NOT NULL,
  pay_tax float(8,2) DEFAULT '0.00' NOT NULL,
  charge_method enum('NB-SOLO'),
  sum float(8,2) DEFAULT '0.00' NOT NULL,
  paid text,
  Created timestamp(14),
  PRIMARY KEY (order_id),
  KEY orderno (orderno),
  KEY shop_id (shop_id)
);

#
# Dumping data for table 'OrderLog'
#
INSERT  DELAYED INTO OrderLog VALUES
(32,3,33,0,0,0,20000410111143,15,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00,0.00,0.00,0.00,
'OBETALD',NY,NULL,109889.01,NULL,20000321151404);
... more lines, all have the same problem ...

Note the NY above, mysql is unable to read this line without '' around NY.
Also note that OBETALD is quoted correctly!

If I'm not mistaken this worked in 3.23.22

>How-To-Repeat:
	se above
>Fix:
	Find-replace in text editor!

>Submitter-Id:	<submitter ID>
>Originator:	Martin Nilsson
>Organization:  Filex AB
>MySQL support: [none]
>Synopsis:	<mysqldump dumps enum without ''>
>Severity:	
>Priority:	
>Category:	mysql
>Class:		
>Release:	mysql-3.23.24-beta (Source distribution)
>Server: /usr/local/bin/mysqladmin  Ver 8.8 Distrib 3.23.24-beta, for
> unknown-freebsdelf3.5 on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version		3.23.24-beta-log
Protocol version	10
Connection		Localhost via UNIX socket
UNIX socket		/tmp/mysql.sock
Uptime:			57 min 13 sec

Threads: 9  Questions: 68  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 8
Queries per second avg: 0.020
>Environment:
	
System: FreeBSD bsdbox.filex.se 3.5-STABLE FreeBSD 3.5-STABLE #0: Mon Aug 28 09:20:12 CEST
2000     root@stripped:/usr/src/sys/compile/SERVER  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: gcc version 2.7.2.3
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
-r--r--r--  1 root  wheel  1052884 28 Aug 09:07 /usr/lib/libc.a
lrwxr-xr-x  1 root  wheel  9 28 Aug 09:07 /usr/lib/libc.so -> libc.so.3
-r--r--r--  1 root  wheel  521297 28 Aug 09:07 /usr/lib/libc.so.3
Configure command: ./configure  --enable-assembler --without-debug
Perl: This is perl, version 5.005_03 built for i386-freebsd
Thread
[mysqldump dumps some enum fields without '']martin19 Sep