Index: includes/menu.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.362
diff -u -p -r1.362 menu.inc
--- includes/menu.inc	11 Nov 2009 08:28:50 -0000	1.362
+++ includes/menu.inc	24 Nov 2009 01:46:03 -0000
@@ -2160,8 +2160,8 @@ function menu_link_load($mlid) {
   if (is_numeric($mlid)) {
     $query = db_select('menu_links', 'ml');
     $query->leftJoin('menu_router', 'm', 'm.path = ml.router_path');
-    $query->fields('ml');
     $query->fields('m');
+    $query->fields('ml');
     $query->condition('ml.mlid', $mlid);
     if ($item = $query->execute()->fetchAssoc()) {
       _menu_link_translate($item);
Index: includes/database/select.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/database/select.inc,v
retrieving revision 1.28
diff -u -p -r1.28 select.inc
--- includes/database/select.inc	10 Nov 2009 22:15:24 -0000	1.28
+++ includes/database/select.inc	24 Nov 2009 01:46:04 -0000
@@ -1123,6 +1123,7 @@ class SelectQuery extends Query implemen
   }
 
   public function fields($table_alias, array $fields = array()) {
+    static $weight = 0;
 
     if ($fields) {
       foreach ($fields as $field) {
@@ -1133,6 +1134,8 @@ class SelectQuery extends Query implemen
     else {
       // We want all fields from this table.
       $this->tables[$table_alias]['all_fields'] = TRUE;
+      // Additionally make sure tables appear in the order they were specified.
+      $this->tables[$table_alias]['weight'] = $weight++;
     }
 
     return $this;
@@ -1285,11 +1288,21 @@ class SelectQuery extends Query implemen
 
     // FIELDS and EXPRESSIONS
     $fields = array();
+    
+    // Before sorting the tables take a copy of them in their original order
+    $orig_order = $this->tables;
+    
+    // Sort the tables by weight so that fields are added in the correct order: e.g., SELECT m.*, ml.*
+    // rather than SELECT ml.*, m.* if the query has been constructed in the order $query->fields('m');
+    // $query->fields('ml');
+    uasort($this->tables, 'drupal_sort_weight');
+    
     foreach ($this->tables as $alias => $table) {
       if (!empty($table['all_fields'])) {
         $fields[] = $alias . '.*';
       }
     }
+    
     foreach ($this->fields as $alias => $field) {
       // Always use the AS keyword for field aliases, as some
       // databases require it (e.g., PostgreSQL).
@@ -1299,7 +1312,9 @@ class SelectQuery extends Query implemen
       $fields[] = $expression['expression'] . ' AS ' . $expression['alias'];
     }
     $query .= implode(', ', $fields);
-
+
+    // Set the tables back to their original order so the rest of the query is constructed correctly.
+    $this->tables = $orig_order;

     // FROM - We presume all queries have a FROM, as any query that doesn't won't need the query builder anyway.
     $query .= "\nFROM ";
