null+****@clear*****
null+****@clear*****
2012年 2月 3日 (金) 09:31:55 JST
Kouhei Sutou 2012-02-03 09:31:55 +0900 (Fri, 03 Feb 2012)
New Revision: 10946b79484daec03c5e509f7b6e8fedb0ed10db
Log:
remove needelss ':' from log message.
Modified files:
lib/db.c
lib/db.h
lib/proc.c
test/unit/core/test-column.c
test/unit/core/test-command-column-create.c
test/unit/core/test-command-load.c
test/unit/core/test-command-table-create.c
test/unit/core/test-table.c
Modified: lib/db.c (+10 -10)
===================================================================
--- lib/db.c 2012-02-02 13:24:33 +0900 (a82b4a9)
+++ lib/db.c 2012-02-03 09:31:55 +0900 (d534ca9)
@@ -3263,15 +3263,15 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
grn_bool ja_p = GRN_FALSE;
GRN_API_ENTER;
if (!table) {
- ERR(GRN_INVALID_ARGUMENT, "[column][create]: table is missing");
+ ERR(GRN_INVALID_ARGUMENT, "[column][create] table is missing");
goto exit;
}
if (!type) {
- ERR(GRN_INVALID_ARGUMENT, "[column][create]: type is missing");
+ ERR(GRN_INVALID_ARGUMENT, "[column][create] type is missing");
goto exit;
}
if (!name || !name_size) {
- ERR(GRN_INVALID_ARGUMENT, "[column][create]: name is missing");
+ ERR(GRN_INVALID_ARGUMENT, "[column][create] name is missing");
goto exit;
}
db = DB_OBJ(table)->db;
@@ -3281,13 +3281,13 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
char table_name[GRN_TABLE_MAX_KEY_SIZE];
table_name_len = grn_obj_name(ctx, table, table_name, GRN_TABLE_MAX_KEY_SIZE);
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: invalid db assigned: <%.*s>.<%.*s>",
+ "[column][create] invalid db assigned: <%.*s>.<%.*s>",
table_name_len, table_name, name_size, name);
goto exit;
}
if (DB_OBJ(table)->id & GRN_OBJ_TMP_OBJECT) {
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: temporary table doesn't support column: <%.*s>",
+ "[column][create] temporary table doesn't support column: <%.*s>",
name_size, name);
goto exit;
}
@@ -3305,7 +3305,7 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
int len = grn_table_get_key(ctx, s->keys, domain, fullname, GRN_TABLE_MAX_KEY_SIZE);
if (name_size + 1 + len > GRN_TABLE_MAX_KEY_SIZE) {
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: too long column name: required name_size(%d) < %d"
+ "[column][create] too long column name: required name_size(%d) < %d"
": <%.*s>.<%.*s>",
name_size, GRN_TABLE_MAX_KEY_SIZE - 1 - len,
len, fullname, name_size, name);
@@ -3316,7 +3316,7 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
name_size += len + 1;
} else {
ERR(GRN_FUNCTION_NOT_IMPLEMENTED,
- "[column][create]: [todo]: table-less column isn't supported yet");
+ "[column][create] [todo] table-less column isn't supported yet");
goto exit;
}
range = DB_OBJ(type)->id;
@@ -3355,7 +3355,7 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
table_name_len = grn_obj_name(ctx, table, table_name,
GRN_TABLE_MAX_KEY_SIZE);
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: path not assigned for persistent column"
+ "[column][create] path not assigned for persistent column"
": <%.*s>.<%.*s>",
table_name_len, table_name, name_size, name);
goto exit;
@@ -3370,7 +3370,7 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
table_name_len = grn_obj_name(ctx, table, table_name,
GRN_TABLE_MAX_KEY_SIZE);
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: path assigned for temporary column"
+ "[column][create] path assigned for temporary column"
": <%.*s>.<%.*s>",
table_name_len, table_name, name_size, name);
goto exit;
@@ -3419,7 +3419,7 @@ grn_column_create(grn_ctx *ctx, grn_obj *table,
table_name_len = grn_obj_name(ctx, table, table_name,
GRN_TABLE_MAX_KEY_SIZE);
GRN_LOG(ctx, GRN_LOG_WARNING,
- "[column][create]: "
+ "[column][create] "
"%s compressed column will leaks memories: <%.*s>.<%.*s>",
zlib_p ? "zlib" : "lzo",
table_name_len, table_name, name_size, name);
Modified: lib/db.h (+1 -1)
===================================================================
--- lib/db.h 2012-02-02 13:24:33 +0900 (b2f57b2)
+++ lib/db.h 2012-02-03 09:31:55 +0900 (2f7271b)
@@ -349,7 +349,7 @@ grn_obj *grn_column_open(grn_ctx *ctx, grn_obj *table,
grn_rc grn_obj_path_rename(grn_ctx *ctx, const char *old_path, const char *new_path);
grn_rc grn_db_check_name(grn_ctx *ctx, const char *name, unsigned int name_size);
-#define GRN_DB_CHECK_NAME_ERR(error_context, name, name_size) ERR(GRN_INVALID_ARGUMENT, "%s: name can't start with '%c' and contains only 0-9, A-Z, a-z, #, - or _: <%.*s>", error_context, GRN_DB_PSEUDO_COLUMN_PREFIX, name_size, name)
+#define GRN_DB_CHECK_NAME_ERR(error_context, name, name_size) ERR(GRN_INVALID_ARGUMENT, "%s name can't start with '%c' and contains only 0-9, A-Z, a-z, #, - or _: <%.*s>", error_context, GRN_DB_PSEUDO_COLUMN_PREFIX, name_size, name)
#define GRN_DB_P(s) ((s) && ((grn_db *)s)->obj.header.type == GRN_DB)
#define GRN_DB_PERSISTENT_P(s) (((grn_db *)s)->specs)
Modified: lib/proc.c (+4 -4)
===================================================================
--- lib/proc.c 2012-02-02 13:24:33 +0900 (b3be640)
+++ lib/proc.c 2012-02-03 09:31:55 +0900 (c029f1d)
@@ -945,22 +945,22 @@ proc_column_create(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_
table = grn_ctx_get(ctx, GRN_TEXT_VALUE(VAR(0)), GRN_TEXT_LEN(VAR(0)));
if (!table) {
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: table doesn't exist: <%.*s>",
- GRN_TEXT_LEN(VAR(0)), GRN_TEXT_VALUE(VAR(0))) ;
+ "[column][create] table doesn't exist: <%.*s>",
+ GRN_TEXT_LEN(VAR(0)), GRN_TEXT_VALUE(VAR(0)));
goto exit;
}
type = grn_ctx_get(ctx, GRN_TEXT_VALUE(VAR(3)),
GRN_TEXT_LEN(VAR(3)));
if (!type) {
ERR(GRN_INVALID_ARGUMENT,
- "[column][create]: type doesn't exist: <%.*s>",
+ "[column][create] type doesn't exist: <%.*s>",
GRN_TEXT_LEN(VAR(3)), GRN_TEXT_VALUE(VAR(3))) ;
goto exit;
}
if (GRN_TEXT_LEN(VAR(1))) {
flags |= GRN_OBJ_PERSISTENT;
} else {
- ERR(GRN_INVALID_ARGUMENT, "[column][create]: name is missing");
+ ERR(GRN_INVALID_ARGUMENT, "[column][create] name is missing");
goto exit;
}
column = grn_column_create(ctx, table,
Modified: test/unit/core/test-column.c (+2 -2)
===================================================================
--- test/unit/core/test-column.c 2012-02-02 13:24:33 +0900 (82913f2)
+++ test/unit/core/test-column.c 2012-02-03 09:31:55 +0900 (23d5bac)
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2009-2011 Kouhei Sutou <kou****@clear*****>
+ Copyright (C) 2009-2012 Kouhei Sutou <kou****@clear*****>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -174,7 +174,7 @@ test_create_on_temporary_table(void)
NULL, 0,
get_object("Int32"));
grn_test_assert_error(GRN_INVALID_ARGUMENT,
- "[column][create]: "
+ "[column][create] "
"temporary table doesn't support column: <count>",
context);
}
Modified: test/unit/core/test-command-column-create.c (+7 -7)
===================================================================
--- test/unit/core/test-command-column-create.c 2012-02-02 13:24:33 +0900 (f5c1b12)
+++ test/unit/core/test-command-column-create.c 2012-02-03 09:31:55 +0900 (38692dd)
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2011 Kouhei Sutou <kou****@clear*****>
+ Copyright (C) 2011-2012 Kouhei Sutou <kou****@clear*****>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -87,7 +87,7 @@ test_invalid_name(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[column][create]: name can't start with '_' "
+ "[column][create] name can't start with '_' "
"and contains only 0-9, A-Z, a-z, #, - or _: <_name>",
"column_create Users _name COLUMN_SCALAR ShortText");
}
@@ -99,7 +99,7 @@ test_missing_name(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[column][create]: name is missing",
+ "[column][create] name is missing",
"column_create Users --flags COLUMN_SCALAR --type ShortText");
}
@@ -119,9 +119,9 @@ test_too_long_name(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[column][create]: too long column name"
+ "[column][create] too long column name"
": required name_size(4091) < 4090"
- ": <Users>.<aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeee",
+ ": <Users>.<aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeee",
command->str);
}
@@ -131,7 +131,7 @@ test_nonexistent_table(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[column][create]: table doesn't exist: <Users>",
+ "[column][create] table doesn't exist: <Users>",
"column_create Users name COLUMN_SCALAR ShortText");
}
@@ -142,6 +142,6 @@ test_nonexistent_type(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[column][create]: type doesn't exist: <VeryShortText>",
+ "[column][create] type doesn't exist: <VeryShortText>",
"column_create Users name COLUMN_SCALAR VeryShortText");
}
Modified: test/unit/core/test-command-load.c (+1 -1)
===================================================================
--- test/unit/core/test-command-load.c 2012-02-02 13:24:33 +0900 (92da745)
+++ test/unit/core/test-command-load.c 2012-02-03 09:31:55 +0900 (a06725d)
@@ -495,7 +495,7 @@ test_invalid_table_name(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[table][load]: name can't start with '_' "
+ "[table][load] name can't start with '_' "
"and contains only 0-9, A-Z, a-z, #, - or _: <_Users>",
"load --table _Users\n"
"[\n"
Modified: test/unit/core/test-command-table-create.c (+2 -2)
===================================================================
--- test/unit/core/test-command-table-create.c 2012-02-02 13:24:33 +0900 (ac7ff15)
+++ test/unit/core/test-command-table-create.c 2012-02-03 09:31:55 +0900 (2dfb88e)
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2011 Kouhei Sutou <kou****@clear*****>
+ Copyright (C) 2011-2012 Kouhei Sutou <kou****@clear*****>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -123,7 +123,7 @@ test_invalid_name(void)
grn_test_assert_send_command_error(
context,
GRN_INVALID_ARGUMENT,
- "[table][create]: name can't start with '_' and "
+ "[table][create] name can't start with '_' and "
"contains only 0-9, A-Z, a-z, #, - or _: <_Users>",
"table_create _Users");
}
Modified: test/unit/core/test-table.c (+1 -1)
===================================================================
--- test/unit/core/test-table.c 2012-02-02 13:24:33 +0900 (828b3c1)
+++ test/unit/core/test-table.c 2012-02-03 09:31:55 +0900 (ca8c1fd)
@@ -468,7 +468,7 @@ test_create_with_invalid_name(gpointer data)
NULL, NULL);
grn_test_assert_error(
GRN_INVALID_ARGUMENT,
- cut_take_printf("[table][create]: name can't start with '_' and "
+ cut_take_printf("[table][create] name can't start with '_' and "
"contains only 0-9, A-Z, a-z, #, - or _: <%s>",
table_name),
context);