diff options
-rw-r--r-- | src/my/test_my.c | 17 |
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 | ||