Index: wp-includes/wp-db.php
===================================================================
--- wp-includes/wp-db.php	(revision 21103)
+++ wp-includes/wp-db.php	(working copy)
@@ -850,7 +850,8 @@
 	 * @return void
 	 */
 	function escape_by_ref( &$string ) {
-		$string = $this->_real_escape( $string );
+		if ( !is_float( $string ) )
+			$string = $this->_real_escape( $string );
 	}
 
 	/**
@@ -901,6 +902,7 @@
 			$args = $args[0];
 		$query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it
 		$query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
+		$query = str_replace( '%f' , '%F', $query ); // Force floats to be locale unaware		
 		$query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s
 		array_walk( $args, array( &$this, 'escape_by_ref' ) );
 		return @vsprintf( $query, $args );
@@ -1214,6 +1216,10 @@
 				$form = $this->field_types[$field];
 			else
 				$form = '%s';
+
+			if ( in_array( $form, array( '%f', '%F' ) ) )
+				$data[ $field ] = str_replace( ',', '.', $data[ $field ] );
+
 			$formatted_fields[] = $form;
 		}
 		$sql = "{$type} INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES (" . implode( ",", $formatted_fields ) . ")";
@@ -1254,6 +1260,10 @@
 				$form = $this->field_types[$field];
 			else
 				$form = '%s';
+
+			if ( in_array( $form, array( '%f', '%F' ) ) )
+				$data[ $field ] = str_replace( ',', '.', $data[ $field ] );
+
 			$bits[] = "`$field` = {$form}";
 		}
 
@@ -1265,6 +1275,10 @@
 				$form = $this->field_types[$field];
 			else
 				$form = '%s';
+
+			if ( in_array( $form, array( '%f', '%F' ) ) )
+				$where[ $field ] = str_replace( ',', '.', $where[ $field ] );
+
 			$wheres[] = "`$field` = {$form}";
 		}
 
