Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.66
diff -u -p -r1.1.2.12.2.66 apachesolr.module
--- apachesolr.module	3 Dec 2008 18:48:00 -0000	1.1.2.12.2.66
+++ apachesolr.module	4 Dec 2008 01:05:43 -0000
@@ -922,14 +922,15 @@ function apachesolr_cck_fields() {
       // A single default mapping for text fields.
       $mappings['text'] = array('callback' => '', 'index_type' => 'string', 'widget_types' => array('optionwidgets_select' => 1, 'optionwidgets_buttons' => 1));
       $mappings = module_invoke_all('apachesolr_cck_field_mappings') + $mappings;
-      $result = db_query("SELECT CONCAT('cck_', i.field_name) AS name, f.multiple, f.type AS field_type, i.widget_type, i.label FROM {content_node_field_instance} i INNER JOIN {content_node_field} f ON i.field_name = f.field_name;");
+      $result = db_query("SELECT  i.field_name, f.multiple, f.type AS field_type, i.widget_type, i.label FROM {content_node_field_instance} i INNER JOIN {content_node_field} f ON i.field_name = f.field_name;");
       while ($row = db_fetch_object($result)) {
         // Only deal with fields that have options widgets (facets don't make sense otherwise), or fields that have specific mappings.
         if (isset($mappings[$row->field_type]) && !empty($mappings[$row->field_type]['widget_types'][$row->widget_type])) {
           $row->index_type = $mappings[$row->field_type]['index_type'];
           $row->callback = $mappings[$row->field_type]['callback'];
           $row->multiple = (bool) $row->multiple;
-          $fields[$row->name] = (array) $row;
+          $row->name = 'cck_' . $row->field_name;
+          $fields[$row->field_name] = (array) $row;
         }
       }
     }
