aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-09 13:20:23 -0500
committerBrian Cully <bjc@kublai.com>2012-02-09 13:20:23 -0500
commit15f39a3daaf5d128b2be9fb02c1a5e932af02d68 (patch)
tree9a2f260c689ef8e5f41918c1447d9853b6155fe1 /src
parent38aafd74afeec8092b6329ac80e9bd2ecc69fb79 (diff)
downloadmysqlerl-15f39a3daaf5d128b2be9fb02c1a5e932af02d68.tar.gz
mysqlerl-15f39a3daaf5d128b2be9fb02c1a5e932af02d68.zip
Convert tabs to spaces.
Diffstat (limited to 'src')
-rw-r--r--src/mysqlerl.c26
-rw-r--r--src/mysqlerl.erl2
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mysqlerl.c b/src/mysqlerl.c
index d349bf1..5c67517 100644
--- a/src/mysqlerl.c
+++ b/src/mysqlerl.c
@@ -185,7 +185,7 @@ make_rows(my_ulonglong count)
exit(3);
default:
logmsg("ERROR: Couldn't fetch a row (%d): %s",
- mysql_stmt_errno(sth), mysql_stmt_error(sth));
+ mysql_stmt_errno(sth), mysql_stmt_error(sth));
exit(3);
}
}
@@ -275,17 +275,17 @@ handle_query(ETERM *cmd)
mysql_stmt_errno(handle), mysql_stmt_error(handle));
} else if (mysql_stmt_execute(handle)) {
resp = erl_format("{error, {mysql_error, ~i, ~s}}",
- mysql_stmt_errno(handle), mysql_stmt_error(handle));
+ mysql_stmt_errno(handle), mysql_stmt_error(handle));
} else {
set_mysql_results(handle);
if (results) {
resp = handle_mysql_result(results);
} else {
if (mysql_num_fields(results) == 0)
- resp = erl_format("{updated, ~i}", numrows);
+ resp = erl_format("{updated, ~i}", numrows);
else
- resp = erl_format("{error, {mysql_error, ~i, ~s}}",
- mysql_stmt_errno(handle), mysql_stmt_error(handle));
+ resp = erl_format("{error, {mysql_error, ~i, ~s}}",
+ mysql_stmt_errno(handle), mysql_stmt_error(handle));
}
}
@@ -381,13 +381,13 @@ handle_param_query(ETERM *msg)
value = erl_element(2, p);
if (ERL_IS_TUPLE(type)) {
- // Parameter Type + Size: {Type, Size}
+ // Parameter Type + Size: {Type, Size}
ETERM *t_type, *t_size;
char *t;
- unsigned long size;
+ unsigned long size;
t_size = erl_element(2, type);
- size = ERL_INT_VALUE(t_size);
+ size = ERL_INT_VALUE(t_size);
bind[i].buffer_length = size;
erl_free_term(t_size);
@@ -441,7 +441,7 @@ handle_param_query(ETERM *msg)
free(val);
}
} else if (strncmp(t, VARCHAR_SQL, strlen(VARCHAR_SQL)) == 0) {
- (void)bind_string(&bind[i], value, size);
+ (void)bind_string(&bind[i], value, size);
} else {
logmsg("ERROR: Unknown sized type: {%s, %d}", t,
bind[i].buffer_length);
@@ -478,9 +478,9 @@ handle_param_query(ETERM *msg)
if (ERL_IS_ATOM(value)
&& strncmp((char *)ERL_ATOM_PTR(value),
NULL_SQL, strlen(NULL_SQL)) == 0)
- bind[i].is_null = &TRUTHY;
+ bind[i].is_null = &TRUTHY;
else
- bind[i].is_null = &FALSY;
+ bind[i].is_null = &FALSY;
erl_free_term(value);
erl_free_term(type);
@@ -509,7 +509,7 @@ handle_param_query(ETERM *msg)
}
for (i = 0; i < param_count; i++) {
- free(bind[i].length);
+ free(bind[i].length);
free(bind[i].buffer);
}
free(bind);
@@ -549,7 +549,7 @@ handle_select_count(ETERM *msg)
resp = erl_format("{ok, ~i}", mysql_stmt_affected_rows(handle));
} else {
resp = erl_format("{error, {mysql_error, ~i, ~s}}",
- mysql_stmt_errno(handle), mysql_stmt_error(handle));
+ mysql_stmt_errno(handle), mysql_stmt_error(handle));
}
}
erl_free(q);
diff --git a/src/mysqlerl.erl b/src/mysqlerl.erl
index 0f9e77e..d6a3cf6 100644
--- a/src/mysqlerl.erl
+++ b/src/mysqlerl.erl
@@ -52,7 +52,7 @@ commit(Ref, rollback, Timeout) ->
{num_rows, _} -> ok;
Other -> Other
end.
-
+
%% Arguments:
%% Host = string()
%% Port = integer()