summaryrefslogtreecommitdiff
path: root/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c
diff options
context:
space:
mode:
authorKentoku <kentokushiba@gmail.com>2017-10-10 23:15:25 +0900
committerKentoku <kentokushiba@gmail.com>2017-10-10 23:15:25 +0900
commit13167e64898da6373fa8cab2ad89514eaf886412 (patch)
tree80bf1b092bc5ebd5d64624a2df41ac31bf115959 /storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c
parent494d1bf8859bbc9f80779144d07ce0603523d813 (diff)
downloadmariadb-git-13167e64898da6373fa8cab2ad89514eaf886412.tar.gz
Update Mroonga to the latest version on 2017-10-10T23:15:25+0900
Diffstat (limited to 'storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c')
-rw-r--r--storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c
index 7e06874dffd..9e378f5530b 100644
--- a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c
+++ b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2008 Kouhei Sutou <kou@cozmixng.org>
+ Copyright (C) 2008-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
@@ -17,6 +17,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include <groonga.h>
@@ -226,11 +227,17 @@ bench_teardown(gpointer user_data)
int
main(int argc, gchar **argv)
{
+ grn_rc rc;
BenchmarkData data;
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);
data.context = g_new(grn_ctx, 1);
@@ -266,5 +273,5 @@ main(int argc, gchar **argv)
bench_quit();
grn_fin();
- return 0;
+ return EXIT_SUCCESS;
}