aboutsummaryrefslogtreecommitdiff
path: root/src/my
diff options
context:
space:
mode:
authorChristophe Genevey Metat <genevey.christophe@gmail.com>2016-05-30 16:19:14 +0000
committerChristophe Genevey Metat <genevey.christophe@gmail.com>2016-05-30 16:19:14 +0000
commit993f58bc44663821311792bc46f025f2ac3a9695 (patch)
tree41f70e6e88e37556ebb241c64c37d25cfb260e64 /src/my
parent0c9e498f3d07a285e1a3db51a1c6f1049f022362 (diff)
downloadgnunet-993f58bc44663821311792bc46f025f2ac3a9695.tar.gz
gnunet-993f58bc44663821311792bc46f025f2ac3a9695.zip
fix select request
Diffstat (limited to 'src/my')
-rw-r--r--src/my/test_my.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/my/test_my.c b/src/my/test_my.c
index 8c088d807..3cd6881c1 100644
--- a/src/my/test_my.c
+++ b/src/my/test_my.c
@@ -47,8 +47,8 @@ run_queries (struct GNUNET_MYSQL_Context *context)
47 uint32_t u32; 47 uint32_t u32;
48 uint64_t u64; 48 uint64_t u64;
49 49
50 struct GNUNET_MYSQL_StatementHandle *statements_handle_insert; 50// struct GNUNET_MYSQL_StatementHandle *statements_handle_insert;
51// struct GNUNET_MYSQL_StatementHandle *statements_handle_select; 51 struct GNUNET_MYSQL_StatementHandle *statements_handle_select;
52 52
53 struct GNUNET_CRYPTO_RsaPrivateKey *priv; 53 struct GNUNET_CRYPTO_RsaPrivateKey *priv;
54 struct GNUNET_HashCode hmsg; 54 struct GNUNET_HashCode hmsg;
@@ -62,6 +62,7 @@ run_queries (struct GNUNET_MYSQL_Context *context)
62 u32 = 32; 62 u32 = 32;
63 u64 = 64; 63 u64 = 64;
64 64
65/* FIXE THE INSERT QUERY
65 statements_handle_insert = GNUNET_MYSQL_statement_prepare (context, 66 statements_handle_insert = GNUNET_MYSQL_statement_prepare (context,
66 "INSERT INTO test_my (" 67 "INSERT INTO test_my ("
67 " pub" 68 " pub"
@@ -74,8 +75,8 @@ run_queries (struct GNUNET_MYSQL_Context *context)
74 ",u32" 75 ",u32"
75 ",u64" 76 ",u64"
76 ") VALUES " 77 ") VALUES "
77 "($1, $2, $3, $4, $5, $6," 78 "(@1, @2, @3, @4, @5, @6,"
78 "$7, $8, $9)"); 79 "@7, @8, @9);");
79 80
80 if (NULL == statements_handle_insert) 81 if (NULL == statements_handle_insert)
81 { 82 {
@@ -101,10 +102,12 @@ run_queries (struct GNUNET_MYSQL_Context *context)
101 statements_handle_insert, 102 statements_handle_insert,
102 params_insert)) 103 params_insert))
103 { 104 {
104 fprintf (stderr, "Failed to execute prepared statement\n"); 105 fprintf (stderr,
106 "Failed to execute prepared statement\n");
105 return 22; 107 return 22;
106 } 108 }
107/* statements_handle_select = GNUNET_MYSQL_statement_prepare (context, 109*/
110 statements_handle_select = GNUNET_MYSQL_statement_prepare (context,
108 "SELECT" 111 "SELECT"
109 " pub" 112 " pub"
110 ",sig" 113 ",sig"
@@ -136,7 +139,7 @@ run_queries (struct GNUNET_MYSQL_Context *context)
136 fprintf (stderr, "Failed to execute prepared statement\n"); 139 fprintf (stderr, "Failed to execute prepared statement\n");
137 return 22; 140 return 22;
138 } 141 }
139*/ 142
140 return 0; 143 return 0;
141} 144}
142 145