开发者

Trouble with MySQL 5.1 and RANGE?

We have a pile of old databases in archives that have a column named RANGE in one of the tables. These database could have been created in MySQL 4.1 or 5.0. In MySQL 5.1+, RANGE is apparently a keyword for the query language. So now we have to change our schema for that table or we won't have any data at all. Just to be clear, its not that we have d开发者_Go百科ata with a value of "RANGE", but a column in a row is named "RANGE".

That's not a problem, but how do we support using the old database archives?

Some archives are the output of mysqldump or some equivalent so it looks like a MySQL flavor of SQL. Some archives are just copies of the database directory from the data directory of MySQL. We are only using the MyISAM engine because we don't need transaction support.

Can they be restored back no problem, or will we have to "convert" them to the new schema first to get MySQL 5.1 to use them?


Can you not just use the ` character to surround any usage of the word range?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜