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]

Reply via email to