ALTER TABLE `table1` ADD `fm742421` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742421` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742421` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742422` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742422` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742422` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742422` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742423` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742423` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742423` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742423` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742424` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742424` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742424` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742424` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742425` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742425` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742425` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742425` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742426` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742426` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742426` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742426` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742427` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742427` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742427` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742427` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742428` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742428` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742428` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742428` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742429` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742429` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742429` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742429` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742430` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742430` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742430` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742430` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742431` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742431` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742431` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742431` int DEFAULT 0;
ALTER TABLE `table1` ADD `f742432` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm742432` int DEFAULT 0;
ALTER TABLE `table2` ADD `f742432` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm742432` int DEFAULT 0;
ALTER TABLE `table1` ADD `f1001` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm1001` int DEFAULT 0;
ALTER TABLE `table2` ADD `f1001` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm1001` int DEFAULT 0;
ALTER TABLE `table1` ADD `f156` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm156` int DEFAULT 0;
ALTER TABLE `table2` ADD `f156` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm156` int DEFAULT 0;
ALTER TABLE `table1` ADD `f723000` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm723000` int DEFAULT 0;
ALTER TABLE `table2` ADD `f723000` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm723000` int DEFAULT 0;
ALTER TABLE `table1` ADD `f815045` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm815045` int DEFAULT 0;
ALTER TABLE `table2` ADD `f815045` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm815045` int DEFAULT 0;
ALTER TABLE `table1` ADD `f100430` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm100430` int DEFAULT 0;
ALTER TABLE `table2` ADD `f100430` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm100430` int DEFAULT 0;
ALTER TABLE `table1` ADD `f100431` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm100431` int DEFAULT 0;
ALTER TABLE `table2` ADD `f100431` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm100431` int DEFAULT 0;
ALTER TABLE `table1` ADD `f165004` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm165004` int DEFAULT 0;
ALTER TABLE `table2` ADD `f165004` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm165004` int DEFAULT 0;
ALTER TABLE `table1` ADD `f440064` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm440064` int DEFAULT 0;
ALTER TABLE `table2` ADD `f440064` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm440064` int DEFAULT 0;
ALTER TABLE `table1` ADD `f135024` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm135024` int DEFAULT 0;
ALTER TABLE `table2` ADD `f135024` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm135024` int DEFAULT 0;
ALTER TABLE `table1` ADD `f161004` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm161004` int DEFAULT 0;
ALTER TABLE `table2` ADD `f161004` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm161004` int DEFAULT 0;
ALTER TABLE `table1` ADD `f410064` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm410064` int DEFAULT 0;
ALTER TABLE `table2` ADD `f410064` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm410064` int DEFAULT 0;
ALTER TABLE `table1` ADD `f131024` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm131024` int DEFAULT 0;
ALTER TABLE `table2` ADD `f131024` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm131024` int DEFAULT 0;
ALTER TABLE `table1` ADD `f163004` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm163004` int DEFAULT 0;
ALTER TABLE `table2` ADD `f163004` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm163004` int DEFAULT 0;
ALTER TABLE `table1` ADD `f490064` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm490064` int DEFAULT 0;
ALTER TABLE `table2` ADD `f490064` int DEFAULT 0;
ALTER TABLE `table2` ADD `fm490064` int DEFAULT 0;
ALTER TABLE `table1` ADD `f133024` int DEFAULT 0;
ALTER TABLE `table1` ADD `fm133024` int DEFAULT 0;
ALTER TABLE `table2` ADD `f133024` int DEFAULT 0;
-----------------------------------------------------注:前面几条是可以成功的..错误信息:
MySql.Data.MySqlClient.MySqlException: Error on rename of '.\db\table1.MYI' to '.\db\#sql2-3c4-3.MYI' (Errcode: 13) 

解决方案 »

  1.   

    你的磁盘空间还有多少?你的table1, table2 当前的文件大小是多少?
      

  2.   

    估计是文件正在被锁定中。alter 表其实Mysql会重新create 一张表,然后把原表数据复制过去之后,再删除原表,之后再重命名新表为原表名。
      

  3.   

    估计是文件正在被锁定中。alter 表其实Mysql会重新create 一张表,然后把原表数据复制过去之后,再删除原表,之后再重命名新表为原表名。
      

  4.   

    建议你把这多句分离的合并为一句
    alter table table1 add (`fm742421` int DEFAULT 0, f742422` int DEFAULT 0);
      

  5.   


    那好奇怪哦,难道mysql都把这些命令发送到后台就不管了的?
    照道理,应该执行完了一句才下一句啊
    关注下答案...
      

  6.   

    估计你的问题跟磁盘空间没关系。如果你事后还能添加,说明栏位总数也没达到最大。你的语句刚刚试验过,没有问题,一次执行完毕,用的是 phpmyadmin 。给你建表语句(没用的话,就算了):
    多了个主键 iNo。
    --
    -- 表的结构 `table1`
    --CREATE TABLE IF NOT EXISTS `table1` (
      `iNo` int(11) NOT NULL AUTO_INCREMENT,
      `fm742421` int(11) DEFAULT '0',
      `f742422` int(11) DEFAULT '0',
      `fm742422` int(11) DEFAULT '0',
      `f742423` int(11) DEFAULT '0',
      `fm742423` int(11) DEFAULT '0',
      `f742424` int(11) DEFAULT '0',
      `fm742424` int(11) DEFAULT '0',
      `f742425` int(11) DEFAULT '0',
      `fm742425` int(11) DEFAULT '0',
      `f742426` int(11) DEFAULT '0',
      `fm742426` int(11) DEFAULT '0',
      `f742427` int(11) DEFAULT '0',
      `fm742427` int(11) DEFAULT '0',
      `f742428` int(11) DEFAULT '0',
      `fm742428` int(11) DEFAULT '0',
      `f742429` int(11) DEFAULT '0',
      `fm742429` int(11) DEFAULT '0',
      `f742430` int(11) DEFAULT '0',
      `fm742430` int(11) DEFAULT '0',
      `f742431` int(11) DEFAULT '0',
      `fm742431` int(11) DEFAULT '0',
      `f742432` int(11) DEFAULT '0',
      `fm742432` int(11) DEFAULT '0',
      `f1001` int(11) DEFAULT '0',
      `fm1001` int(11) DEFAULT '0',
      `f156` int(11) DEFAULT '0',
      `fm156` int(11) DEFAULT '0',
      `f723000` int(11) DEFAULT '0',
      `fm723000` int(11) DEFAULT '0',
      `f815045` int(11) DEFAULT '0',
      `fm815045` int(11) DEFAULT '0',
      `f100430` int(11) DEFAULT '0',
      `fm100430` int(11) DEFAULT '0',
      `f100431` int(11) DEFAULT '0',
      `fm100431` int(11) DEFAULT '0',
      `f165004` int(11) DEFAULT '0',
      `fm165004` int(11) DEFAULT '0',
      `f440064` int(11) DEFAULT '0',
      `fm440064` int(11) DEFAULT '0',
      `f135024` int(11) DEFAULT '0',
      `fm135024` int(11) DEFAULT '0',
      `f161004` int(11) DEFAULT '0',
      `fm161004` int(11) DEFAULT '0',
      `f410064` int(11) DEFAULT '0',
      `fm410064` int(11) DEFAULT '0',
      `f131024` int(11) DEFAULT '0',
      `fm131024` int(11) DEFAULT '0',
      `f163004` int(11) DEFAULT '0',
      `fm163004` int(11) DEFAULT '0',
      `f490064` int(11) DEFAULT '0',
      `fm490064` int(11) DEFAULT '0',
      `f133024` int(11) DEFAULT '0',
      `fm133024` int(11) DEFAULT '0',
      PRIMARY KEY (`iNo`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;-- ----------------------------------------------------------
    -- 表的结构 `table2`
    --CREATE TABLE IF NOT EXISTS `table2` (
      `iNo` int(11) NOT NULL AUTO_INCREMENT,
      `f742421` int(11) DEFAULT '0',
      `fm742421` int(11) DEFAULT '0',
      `f742422` int(11) DEFAULT '0',
      `fm742422` int(11) DEFAULT '0',
      `f742423` int(11) DEFAULT '0',
      `fm742423` int(11) DEFAULT '0',
      `f742424` int(11) DEFAULT '0',
      `fm742424` int(11) DEFAULT '0',
      `f742425` int(11) DEFAULT '0',
      `fm742425` int(11) DEFAULT '0',
      `f742426` int(11) DEFAULT '0',
      `fm742426` int(11) DEFAULT '0',
      `f742427` int(11) DEFAULT '0',
      `fm742427` int(11) DEFAULT '0',
      `f742428` int(11) DEFAULT '0',
      `fm742428` int(11) DEFAULT '0',
      `f742429` int(11) DEFAULT '0',
      `fm742429` int(11) DEFAULT '0',
      `f742430` int(11) DEFAULT '0',
      `fm742430` int(11) DEFAULT '0',
      `f742431` int(11) DEFAULT '0',
      `fm742431` int(11) DEFAULT '0',
      `f742432` int(11) DEFAULT '0',
      `fm742432` int(11) DEFAULT '0',
      `f1001` int(11) DEFAULT '0',
      `fm1001` int(11) DEFAULT '0',
      `f156` int(11) DEFAULT '0',
      `fm156` int(11) DEFAULT '0',
      `f723000` int(11) DEFAULT '0',
      `fm723000` int(11) DEFAULT '0',
      `f815045` int(11) DEFAULT '0',
      `fm815045` int(11) DEFAULT '0',
      `f100430` int(11) DEFAULT '0',
      `fm100430` int(11) DEFAULT '0',
      `f100431` int(11) DEFAULT '0',
      `fm100431` int(11) DEFAULT '0',
      `f165004` int(11) DEFAULT '0',
      `fm165004` int(11) DEFAULT '0',
      `f440064` int(11) DEFAULT '0',
      `fm440064` int(11) DEFAULT '0',
      `f135024` int(11) DEFAULT '0',
      `fm135024` int(11) DEFAULT '0',
      `f161004` int(11) DEFAULT '0',
      `fm161004` int(11) DEFAULT '0',
      `f410064` int(11) DEFAULT '0',
      `fm410064` int(11) DEFAULT '0',
      `f131024` int(11) DEFAULT '0',
      `fm131024` int(11) DEFAULT '0',
      `f163004` int(11) DEFAULT '0',
      `fm163004` int(11) DEFAULT '0',
      `f490064` int(11) DEFAULT '0',
      `fm490064` int(11) DEFAULT '0',
      `f133024` int(11) DEFAULT '0',
      PRIMARY KEY (`iNo`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;