|
35 | 35 | #include <time.h> |
36 | 36 | #ifdef USE_SQLITE |
37 | 37 | #include <sqlite3.h> |
38 | | -#include <apr_reslist.h> |
39 | | -#include <apr_hash.h> |
40 | | -#ifdef APR_HAS_THREADS |
41 | | -#include <apr_thread_mutex.h> |
42 | | -#endif |
| 38 | +#include <float.h> |
43 | 39 | #endif |
44 | 40 |
|
45 | 41 |
|
@@ -526,41 +522,39 @@ static void _bind_sqlite_timedimension_params(mapcache_context *ctx, sqlite3_stm |
526 | 522 | } |
527 | 523 | } |
528 | 524 |
|
529 | | - if(extent) { |
530 | | - paramidx = sqlite3_bind_parameter_index(stmt, ":minx"); |
531 | | - if (paramidx) { |
532 | | - ret = sqlite3_bind_double(stmt, paramidx, extent->minx); |
533 | | - if(ret != SQLITE_OK) { |
534 | | - ctx->set_error(ctx,400, "failed to bind :minx %s", sqlite3_errmsg(handle)); |
535 | | - return; |
536 | | - } |
| 525 | + paramidx = sqlite3_bind_parameter_index(stmt, ":minx"); |
| 526 | + if (paramidx) { |
| 527 | + ret = sqlite3_bind_double(stmt, paramidx, extent?extent->minx:-DBL_MAX); |
| 528 | + if(ret != SQLITE_OK) { |
| 529 | + ctx->set_error(ctx,400, "failed to bind :minx %s", sqlite3_errmsg(handle)); |
| 530 | + return; |
537 | 531 | } |
538 | | - paramidx = sqlite3_bind_parameter_index(stmt, ":miny"); |
539 | | - if (paramidx) { |
540 | | - ret = sqlite3_bind_double(stmt, paramidx, extent->miny); |
541 | | - if(ret != SQLITE_OK) { |
542 | | - ctx->set_error(ctx,400, "failed to bind :miny %s", sqlite3_errmsg(handle)); |
543 | | - return; |
544 | | - } |
| 532 | + } |
| 533 | + paramidx = sqlite3_bind_parameter_index(stmt, ":miny"); |
| 534 | + if (paramidx) { |
| 535 | + ret = sqlite3_bind_double(stmt, paramidx, extent?extent->miny:-DBL_MAX); |
| 536 | + if(ret != SQLITE_OK) { |
| 537 | + ctx->set_error(ctx,400, "failed to bind :miny %s", sqlite3_errmsg(handle)); |
| 538 | + return; |
545 | 539 | } |
546 | | - paramidx = sqlite3_bind_parameter_index(stmt, ":maxx"); |
547 | | - if (paramidx) { |
548 | | - ret = sqlite3_bind_double(stmt, paramidx, extent->maxx); |
549 | | - if(ret != SQLITE_OK) { |
550 | | - ctx->set_error(ctx,400, "failed to bind :maxx %s", sqlite3_errmsg(handle)); |
551 | | - return; |
552 | | - } |
| 540 | + } |
| 541 | + paramidx = sqlite3_bind_parameter_index(stmt, ":maxx"); |
| 542 | + if (paramidx) { |
| 543 | + ret = sqlite3_bind_double(stmt, paramidx, extent?extent->maxx:DBL_MAX); |
| 544 | + if(ret != SQLITE_OK) { |
| 545 | + ctx->set_error(ctx,400, "failed to bind :maxx %s", sqlite3_errmsg(handle)); |
| 546 | + return; |
553 | 547 | } |
554 | | - paramidx = sqlite3_bind_parameter_index(stmt, ":maxy"); |
555 | | - if (paramidx) { |
556 | | - ret = sqlite3_bind_double(stmt, paramidx, extent->maxy); |
557 | | - if(ret != SQLITE_OK) { |
558 | | - ctx->set_error(ctx,400, "failed to bind :maxy %s", sqlite3_errmsg(handle)); |
559 | | - return; |
560 | | - } |
| 548 | + } |
| 549 | + paramidx = sqlite3_bind_parameter_index(stmt, ":maxy"); |
| 550 | + if (paramidx) { |
| 551 | + ret = sqlite3_bind_double(stmt, paramidx, extent?extent->maxy:DBL_MAX); |
| 552 | + if(ret != SQLITE_OK) { |
| 553 | + ctx->set_error(ctx,400, "failed to bind :maxy %s", sqlite3_errmsg(handle)); |
| 554 | + return; |
561 | 555 | } |
562 | 556 | } |
563 | | - |
| 557 | + |
564 | 558 | paramidx = sqlite3_bind_parameter_index(stmt, ":start_timestamp"); |
565 | 559 | if (paramidx) { |
566 | 560 | ret = sqlite3_bind_int64(stmt, paramidx, start); |
|
0 commit comments