Merge lp:~trond-norbye/drizzle/bug_416554 into lp:~drizzle-trunk/drizzle/development

Proposed by Trond Norbye
Status: Merged
Approved by: Monty Taylor
Approved revision: 1125
Merged at revision: not available
Proposed branch: lp:~trond-norbye/drizzle/bug_416554
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: None lines
To merge this branch: bzr merge lp:~trond-norbye/drizzle/bug_416554
Reviewer Review Type Date Requested Status
Monty Taylor Approve
Review via email: mp+10685@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

The rest of the module expect the max records to be uint32_t so add an explicit cast. It is however interesting why it is only the 32bit compilation that complains about the truncation, because share->getMaxRows() returns uint64_t, and the prototype for the function says uint32_t so it _should_ be a truncation on _all_ platforms (this isn't caused by assuming size_t is 64 bit wide).

Revision history for this message
Monty Taylor (mordred) wrote :

Looks great. Merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/heap/ha_heap.cc'
2--- plugin/heap/ha_heap.cc 2009-08-20 18:26:40 +0000
3+++ plugin/heap/ha_heap.cc 2009-08-25 18:41:25 +0000
4@@ -828,7 +828,7 @@
5 column_count, columndef,
6 max_key_fieldnr, key_part_size,
7 share->reclength, mem_per_row_keys,
8- share->getMaxRows(), 0, // Factor out MIN
9+ (uint32_t)share->getMaxRows(), 0, // Factor out MIN
10 &hp_create_info, internal_share);
11
12 free((unsigned char*) keydef);