title: Sphinx: no field found in schema after ATTACH index
body: <p>I have a table in MySQL</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `test` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `article` varchar(50) NOT NULL,
    `oem` varchar(50) NOT NULL,
    `size` varchar(20) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=cp1251 AUTO_INCREMENT=1 ;
  
  INSERT INTO `test` (`id`, `article`, `oem`, `size`) VALUES
  (1, '92S400', '11223', '300x200x200'),
  (2, '92S400', '11224', '300x150x200');
  </code></pre>
  
  <p>and indexes in Sphinx</p>
  
  <pre><code>source s_test
  {
      type            = mysql
  
      sql_host        = localhost
      sql_user        = root
      sql_pass        = 123
      sql_db          = auto
      sql_port        = 3306
  
      sql_query_pre   = SET NAMES cp1251
      sql_query_pre   = SET CHARACTER SET cp1251
  
      sql_query       = \
          SELECT \
              id `id`, \
              'stub' as `stub`, \
              article `article`, \
              oem `oem`, \
              size `size` \
          FROM \
              test
  
      sql_attr_string      = article
      sql_attr_string      = oem
      sql_attr_string      = size
  
      sql_query_info       = SELECT * FROM test WHERE id=$id
  }
  
  index i_test
  {
      source            = s_test
  
      path            =  /var/lib/sphinx/i_test
  
      min_word_len        = 1
      enable_star         = 0
      min_prefix_len      = 3
      expand_keywords     = 1
      index_sp = 0
      stopword_step = 1
      dict=crc
  }
  
  index rt_test
  {
      type                = rt
      rt_mem_limit        = 2047M
  
      path                = /var/lib/sphinx/test
      enable_star         = 1
      min_prefix_len      = 3
      expand_keywords     = 1
      dict                = keywords
      morphology          = stem_en
  
      charset_table = 0..9, A..Z-&gt;a..z, _, a..z, U+A8-&gt;U+E5, U+B8-&gt;U+E5, U+C0..U+DF-&gt;U+E0..U+FF, U+E0..U+FF
  
      rt_field        = article
      rt_field            = oem
  
      rt_attr_string      = size
  }
  </code></pre>
  
  <p>I run commands in shell:</p>
  
  <pre><code>searchd --stop
  rm /var/lib/sphinx/*
  indexer --all
  searchd
  </code></pre>
  
  <p>If insert into rt_test data with 'INSERT' command, for example</p>
  
  <pre><code>INSERT INTO rt_test VALUES (1, '92S400', '11223', '300x200x200'),
  (2, '92S400', '11224', '300x150x200');
  </code></pre>
  
  <p>there is no problems with 'select .. MATCH':</p>
  
  <pre><code>SELECT * FROM rt_test WHERE MATCH('@oem 11223')\G;
  
  *************************** 1. row ***************************
  id: 1
  weight: 1643
    size: 300x200x200
  </code></pre>
  
  <p>But if I remove files, re-run indexer and run attach command</p>
  
  <pre><code>ATTACH INDEX i_test TO RTINDEX rt_test;
  </code></pre>
  
  <p>Sphinx shows error on previous 'SELECT .. MATCH' query:</p>
  
  <pre><code>ERROR 1064 (42000): index rt_test: query error: no field 'oem' found in schema
  </code></pre>
  
  <p>The data from mysql table exists in rt_index. Why disappear indexes rt_oem and rt_article?</p>
  
  <p>PS Sphinx 2.0.8-release (r3831), Xubuntu x64</p>