summaryrefslogtreecommitdiff
path: root/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c')
-rw-r--r--storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c
index d7ed91d0c56..4ce55c55b6a 100644
--- a/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c
+++ b/storage/mroonga/vendor/groonga/benchmark/bench-query-optimizer.c
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2014 Kouhei Sutou <kou@clear-code.com>
+ Copyright (C) 2014-2016 Kouhei Sutou <kou@clear-code.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -135,12 +135,18 @@ teardown_database(grn_ctx *context, grn_obj *database)
int
main(int argc, gchar **argv)
{
+ grn_rc rc;
grn_ctx context;
grn_obj *database;
BenchReporter *reporter;
gint n = 100;
- grn_init();
+ rc = grn_init();
+ if (rc != GRN_SUCCESS) {
+ g_print("failed to initialize Groonga: <%d>: %s\n",
+ rc, grn_get_global_error_message());
+ return EXIT_FAILURE;
+ }
bench_init(&argc, &argv);
grn_ctx_init(&context, 0);
@@ -204,5 +210,5 @@ main(int argc, gchar **argv)
grn_fin();
- return 0;
+ return EXIT_SUCCESS;
}