Re: Replication and mysqldump issues

2003-09-19 Thread jschmidt
It looks like my first issue with slave replication is a verified
bug #1345.

I believe the second one is also because -Q does not quote db names
so I opened a new bug #1348.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Replication and mysqldump issues

2003-09-18 Thread jschmidt
I have a database called abc-100 which seems to cause problems with
replication and importing sql files created with mysqldump.

First, if on the master we create a temporary table (because we
don't have subselects yet) it causes the slave to die with the
following.

Relay log says:

DROP /*!40005 TEMPORARY */ TABLE abc-100.temp_summary

And the error log says:

ERROR: 1064  You have an error in your SQL syntax.  Check the manual
that corresponds to your MySQL server version for the right syntax
to use near '-100.temp_summary

Second, on doing a mysql  dump.sql for a database restore, I have
to manually edit the dump file first and use `` around the abc-100.

So, apparently the - or the -100 is an invalid database name?  If
so, why would mysql allow me to create it in the first place?  Is
there any way to make this work without changing the database name?
 Changing the name is not a trivial matter because I am dealing with
many databases with the same issue, 100, 101, 102 etc.  I am more
concerned with replication than the dump.sql as I can always edit
the database names to be contained in ``.

Thanks for any help you can offer.

Jon




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Replication and mysqldump issues

2003-09-18 Thread Jeremy Zawodny
On Thu, Sep 18, 2003 at 01:47:04PM -0400, [EMAIL PROTECTED] wrote:
 I have a database called abc-100 which seems to cause problems with
 replication and importing sql files created with mysqldump.
 
 First, if on the master we create a temporary table (because we
 don't have subselects yet) it causes the slave to die with the
 following.
 
 Relay log says:
 
 DROP /*!40005 TEMPORARY */ TABLE abc-100.temp_summary
 
 And the error log says:
 
 ERROR: 1064  You have an error in your SQL syntax.  Check the manual
 that corresponds to your MySQL server version for the right syntax
 to use near '-100.temp_summary

That's because something didn't properly quote the table name.  It's
probably mysqldump, if that's what generated the file.  It should be:

  DROP /*!40005 TEMPORARY */ TABLE `abc-100.temp_summary`

Because the '-' is a special character.

Look at the -Q or --quote-names options on mysqldump to solve your
problem.  I'm really not sure why they're off by default.  But they
are.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.15-Yahoo-SMP: up 5 days, processed 190,078,163 queries (439/sec. avg)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]