Merge lp:~clint-fewbar/gearmand/fix-sql-regression into lp:gearmand/1.0

Proposed by Clint Byrum
Status: Merged
Merged at revision: 440
Proposed branch: lp:~clint-fewbar/gearmand/fix-sql-regression
Merge into: lp:gearmand/1.0
Diff against target: 22 lines (+2/-3)
1 file modified
libgearman-server/plugins/queue/drizzle/queue.cc (+2/-3)
To merge this branch: bzr merge lp:~clint-fewbar/gearmand/fix-sql-regression
Reviewer Review Type Date Requested Status
Gearman-developers Pending
Review via email: mp+59064@code.launchpad.net

Description of the change

Fix for borken SQL

To post a comment you must log in.
Revision history for this message
Brian Aker (brianaker) wrote :

Thanks, I'll pull it into the build tree in a moment.

I also have an update on that tree to disable epoch if the schema is not updated.

On Apr 26, 2011, at 7:18 AM, Clint Byrum wrote:

> Clint Byrum has proposed merging lp:~clint-fewbar/gearmand/fix-sql-regression into lp:gearmand.
>
> Requested reviews:
> Gearman-developers (gearman-developers)
> Related bugs:
> Bug #770654 in Gearman: "Two SQL typos in libgearman-server/plugins/queue/drizzle/queue.cc "
> https://bugs.launchpad.net/gearmand/+bug/770654
>
> For more details, see:
> https://code.launchpad.net/~clint-fewbar/gearmand/fix-sql-regression/+merge/59064
>
> Fix for borken SQL
> --
> https://code.launchpad.net/~clint-fewbar/gearmand/fix-sql-regression/+merge/59064
> Your team Gearman-developers is requested to review the proposed merge of lp:~clint-fewbar/gearmand/fix-sql-regression into lp:gearmand.
> === modified file 'libgearman-server/plugins/queue/drizzle/queue.cc'
> --- libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-05 23:59:40 +0000
> +++ libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-26 14:18:28 +0000
> @@ -263,9 +263,8 @@
> "function_name VARCHAR(255),"
> "priority INT,"
> "data LONGBLOB,"
> + "when_to_run INT,"
> "unique key (unique_key, function_name)"
> - "data LONGBLOB,"
> - "when_to_run INT"
> ")",
> queue->table.c_str(), GEARMAN_UNIQUE_SIZE);
>
> @@ -352,7 +351,7 @@
> query.resize(((unique_size + function_name_size + data_size) * 2) + GEARMAN_QUEUE_QUERY_BUFFER);
>
> size_t query_size= (size_t)snprintf(query.c_str(), query.size(),
> - "INSERT INTO %s SET priority=%u,when_to_run=%lldunique_key='",
> + "INSERT INTO %s SET priority=%u,when_to_run=%lld,unique_key='",
> queue->table.c_str(), (uint32_t)priority,
> (long long unsigned int)when);
>
>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libgearman-server/plugins/queue/drizzle/queue.cc'
--- libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-05 23:59:40 +0000
+++ libgearman-server/plugins/queue/drizzle/queue.cc 2011-04-26 14:18:28 +0000
@@ -263,9 +263,8 @@
263 "function_name VARCHAR(255),"263 "function_name VARCHAR(255),"
264 "priority INT,"264 "priority INT,"
265 "data LONGBLOB,"265 "data LONGBLOB,"
266 "when_to_run INT,"
266 "unique key (unique_key, function_name)"267 "unique key (unique_key, function_name)"
267 "data LONGBLOB,"
268 "when_to_run INT"
269 ")",268 ")",
270 queue->table.c_str(), GEARMAN_UNIQUE_SIZE);269 queue->table.c_str(), GEARMAN_UNIQUE_SIZE);
271270
@@ -352,7 +351,7 @@
352 query.resize(((unique_size + function_name_size + data_size) * 2) + GEARMAN_QUEUE_QUERY_BUFFER);351 query.resize(((unique_size + function_name_size + data_size) * 2) + GEARMAN_QUEUE_QUERY_BUFFER);
353352
354 size_t query_size= (size_t)snprintf(query.c_str(), query.size(),353 size_t query_size= (size_t)snprintf(query.c_str(), query.size(),
355 "INSERT INTO %s SET priority=%u,when_to_run=%lldunique_key='",354 "INSERT INTO %s SET priority=%u,when_to_run=%lld,unique_key='",
356 queue->table.c_str(), (uint32_t)priority,355 queue->table.c_str(), (uint32_t)priority,
357 (long long unsigned int)when);356 (long long unsigned int)when);
358357

Subscribers

People subscribed via source and target branches