List:Commits« Previous MessageNext Message »
From:kevin.lewis Date:May 15 2012 4:33pm
Subject:bzr push into mysql-trunk branch (kevin.lewis:3841 to 3842)
View as plain text  
 3842 kevin.lewis@stripped	2012-05-15
      Fix recent compiler warnings on windows platform.
      reviewed, modified, and approved by Vasil

    modified:
      storage/innobase/fts/fts0que.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/row/row0mysql.cc
 3841 Marc Alff	2012-05-15
      Fixed build breaks (MacOSX, Windows)

    modified:
      storage/perfschema/pfs_global.cc
      storage/perfschema/pfs_global.h
=== modified file 'storage/innobase/fts/fts0que.cc'
--- a/storage/innobase/fts/fts0que.cc	revid:marc.alff@stripped
+++ b/storage/innobase/fts/fts0que.cc	revid:kevin.lewis@stripped
@@ -127,7 +127,7 @@ struct fts_query_struct {
 					position info for each matched word
 					in the word list */
 
-	ib_int64_t	total_docs;	/*!< The total number of documents */
+	ib_uint64_t	total_docs;	/*!< The total number of documents */
 
 	ulint		total_words;	/*!< The total number of words */
 
@@ -205,7 +205,7 @@ struct fts_word_freq_struct {
 	ib_rbt_t*	doc_freqs;	/*!< RB Tree for storing per document
 					word frequencies. The elements are
 					of type fts_doc_freq_t */
-	ulint		doc_count;	/*!< Total number of documents that
+	ib_uint64_t	doc_count;	/*!< Total number of documents that
 					contain this word */
 	double		idf;		/*!< Inverse document frequency */
 };
@@ -2873,8 +2873,8 @@ fts_query_calculate_idf(
 /*====================*/
 	fts_query_t*	query)	/*!< in: Query state */
 {
-	const ib_rbt_node_t* node;
-	double		total_docs = query->total_docs;
+	const ib_rbt_node_t*	node;
+	ib_uint64_t		total_docs = query->total_docs;
 
 	/* We need to free any instances of fts_doc_freq_t that we
 	may have allocated. */
@@ -2887,7 +2887,7 @@ fts_query_calculate_idf(
 		word_freq = rbt_value(fts_word_freq_t, node);
 
 		if (word_freq->doc_count > 0) {
-			if (total_docs == (double) word_freq->doc_count) {
+			if (total_docs == word_freq->doc_count) {
 				/* QP assume ranking > 0 if we find
 				a match. Since Log10(1) = 0, we cannot
 				make IDF a zero value if do find a
@@ -2901,7 +2901,7 @@ fts_query_calculate_idf(
 			}
 		}
 
-		fprintf(stderr,"'%s' -> " INT64PF "/%lu %6.5lf\n",
+		fprintf(stderr,"'%s' -> " UINT64PF "/" UINT64PF " %6.5lf\n",
 		       word_freq->word,
 		       query->total_docs, word_freq->doc_count,
 		       word_freq->idf);
@@ -3243,7 +3243,7 @@ fts_query(
 	}
 
 #ifdef	FTS_INTERNAL_DIAG_PRINT
-	fprintf(stderr, "Total docs: " INT64PF " Total words: %lu\n",
+	fprintf(stderr, "Total docs: " UINT64PF " Total words: %lu\n",
 		query.total_docs, query.total_words);
 #endif
 

=== modified file 'storage/innobase/handler/i_s.cc'
--- a/storage/innobase/handler/i_s.cc	revid:marc.alff@stripped
+++ b/storage/innobase/handler/i_s.cc	revid:kevin.lewis@stripped
@@ -5869,7 +5869,7 @@ i_s_dict_fill_sys_tablestats(
 				table->stat_sum_of_other_index_sizes));
 
 		OK(fields[SYS_TABLESTATS_MODIFIED]->store(
-				table->stat_modified_counter));
+				(ulint) table->stat_modified_counter));
 	} else {
 		OK(field_store_string(fields[SYS_TABLESTATS_INIT],
 				      "Uninitialized"));

=== modified file 'storage/innobase/row/row0mysql.cc'
--- a/storage/innobase/row/row0mysql.cc	revid:marc.alff@stripped
+++ b/storage/innobase/row/row0mysql.cc	revid:kevin.lewis@stripped
@@ -1371,7 +1371,7 @@ error_exit:
 
 	que_thr_stop_for_mysql_no_error(thr, trx);
 
-	srv_stats.n_rows_inserted.add(trx->id, 1);
+	srv_stats.n_rows_inserted.add((size_t)trx->id, 1);
 
 	/* Not protected by dict_table_stats_lock() for performance
 	reasons, we would rather get garbage in stat_n_rows (which is
@@ -1743,9 +1743,9 @@ run_again:
 		with a latch. */
 		dict_table_n_rows_dec(prebuilt->table);
 
-		srv_stats.n_rows_deleted.add(trx->id, 1);
+		srv_stats.n_rows_deleted.add((size_t)trx->id, 1);
 	} else {
-		srv_stats.n_rows_updated.add(trx->id, 1);
+		srv_stats.n_rows_updated.add((size_t)trx->id, 1);
 	}
 
 	/* We update table statistics only if it is a DELETE or UPDATE
@@ -1967,9 +1967,9 @@ run_again:
 		with a latch. */
 		dict_table_n_rows_dec(table);
 
-		srv_stats.n_rows_deleted.add(trx->id, 1);
+		srv_stats.n_rows_deleted.add((size_t)trx->id, 1);
 	} else {
-		srv_stats.n_rows_updated.add(trx->id, 1);
+		srv_stats.n_rows_updated.add((size_t)trx->id, 1);
 	}
 
 	row_update_statistics_if_needed(table);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (kevin.lewis:3841 to 3842) kevin.lewis16 May