PageRenderTime 49ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/src/runtime/ext/profile/extprofile_mysql.h

https://github.com/github-ivan/hiphop-php
C Header | 321 lines | 240 code | 62 blank | 19 comment | 0 complexity | 4d8d04fabba459af03315ddc95d279a2 MD5 | raw file
  1. /*
  2. +----------------------------------------------------------------------+
  3. | HipHop for PHP |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
  6. | Copyright (c) 1997-2010 The PHP Group |
  7. +----------------------------------------------------------------------+
  8. | This source file is subject to version 3.01 of the PHP license, |
  9. | that is bundled with this package in the file LICENSE, and is |
  10. | available through the world-wide-web at the following url: |
  11. | http://www.php.net/license/3_01.txt |
  12. | If you did not receive a copy of the PHP license and are unable to |
  13. | obtain it through the world-wide-web, please send a note to |
  14. | license@php.net so we can mail you a copy immediately. |
  15. +----------------------------------------------------------------------+
  16. */
  17. #ifndef __EXTPROFILE_MYSQL_H__
  18. #define __EXTPROFILE_MYSQL_H__
  19. // >>>>>> Generated by idl.php. Do NOT modify. <<<<<<
  20. #include <runtime/ext/ext_mysql.h>
  21. namespace HPHP {
  22. ///////////////////////////////////////////////////////////////////////////////
  23. inline Variant x_mysql_connect(CStrRef server = null_string, CStrRef username = null_string, CStrRef password = null_string, bool new_link = false, int client_flags = 0, int connect_timeout_ms = -1, int query_timeout_ms = -1) {
  24. FUNCTION_INJECTION_BUILTIN(mysql_connect);
  25. return f_mysql_connect(server, username, password, new_link, client_flags, connect_timeout_ms, query_timeout_ms);
  26. }
  27. inline Variant x_mysql_pconnect(CStrRef server = null_string, CStrRef username = null_string, CStrRef password = null_string, int client_flags = 0, int connect_timeout_ms = -1, int query_timeout_ms = -1) {
  28. FUNCTION_INJECTION_BUILTIN(mysql_pconnect);
  29. return f_mysql_pconnect(server, username, password, client_flags, connect_timeout_ms, query_timeout_ms);
  30. }
  31. inline Variant x_mysql_connect_with_db(CStrRef server = null_string, CStrRef username = null_string, CStrRef password = null_string, CStrRef database = null_string, bool new_link = false, int client_flags = 0, int connect_timeout_ms = -1, int query_timeout_ms = -1) {
  32. FUNCTION_INJECTION_BUILTIN(mysql_connect_with_db);
  33. return f_mysql_connect_with_db(server, username, password, database, new_link, client_flags, connect_timeout_ms, query_timeout_ms);
  34. }
  35. inline Variant x_mysql_pconnect_with_db(CStrRef server = null_string, CStrRef username = null_string, CStrRef password = null_string, CStrRef database = null_string, int client_flags = 0, int connect_timeout_ms = -1, int query_timeout_ms = -1) {
  36. FUNCTION_INJECTION_BUILTIN(mysql_pconnect_with_db);
  37. return f_mysql_pconnect_with_db(server, username, password, database, client_flags, connect_timeout_ms, query_timeout_ms);
  38. }
  39. inline Variant x_mysql_set_charset(CStrRef charset, CVarRef link_identifier = null) {
  40. FUNCTION_INJECTION_BUILTIN(mysql_set_charset);
  41. return f_mysql_set_charset(charset, link_identifier);
  42. }
  43. inline Variant x_mysql_ping(CVarRef link_identifier = null) {
  44. FUNCTION_INJECTION_BUILTIN(mysql_ping);
  45. return f_mysql_ping(link_identifier);
  46. }
  47. inline String x_mysql_escape_string(CStrRef unescaped_string) {
  48. FUNCTION_INJECTION_BUILTIN(mysql_escape_string);
  49. TAINT_OBSERVER(TAINT_BIT_MUTATED, TAINT_BIT_SQL);
  50. return f_mysql_escape_string(unescaped_string);
  51. }
  52. inline Variant x_mysql_real_escape_string(CStrRef unescaped_string, CVarRef link_identifier = null) {
  53. FUNCTION_INJECTION_BUILTIN(mysql_real_escape_string);
  54. TAINT_OBSERVER(TAINT_BIT_MUTATED, TAINT_BIT_SQL);
  55. return f_mysql_real_escape_string(unescaped_string, link_identifier);
  56. }
  57. inline Variant x_mysql_client_encoding(CVarRef link_identifier = null) {
  58. FUNCTION_INJECTION_BUILTIN(mysql_client_encoding);
  59. return f_mysql_client_encoding(link_identifier);
  60. }
  61. inline Variant x_mysql_close(CVarRef link_identifier = null) {
  62. FUNCTION_INJECTION_BUILTIN(mysql_close);
  63. return f_mysql_close(link_identifier);
  64. }
  65. inline Variant x_mysql_errno(CVarRef link_identifier = null) {
  66. FUNCTION_INJECTION_BUILTIN(mysql_errno);
  67. return f_mysql_errno(link_identifier);
  68. }
  69. inline Variant x_mysql_error(CVarRef link_identifier = null) {
  70. FUNCTION_INJECTION_BUILTIN(mysql_error);
  71. return f_mysql_error(link_identifier);
  72. }
  73. inline String x_mysql_get_client_info() {
  74. FUNCTION_INJECTION_BUILTIN(mysql_get_client_info);
  75. return f_mysql_get_client_info();
  76. }
  77. inline Variant x_mysql_get_host_info(CVarRef link_identifier = null) {
  78. FUNCTION_INJECTION_BUILTIN(mysql_get_host_info);
  79. return f_mysql_get_host_info(link_identifier);
  80. }
  81. inline Variant x_mysql_get_proto_info(CVarRef link_identifier = null) {
  82. FUNCTION_INJECTION_BUILTIN(mysql_get_proto_info);
  83. return f_mysql_get_proto_info(link_identifier);
  84. }
  85. inline Variant x_mysql_get_server_info(CVarRef link_identifier = null) {
  86. FUNCTION_INJECTION_BUILTIN(mysql_get_server_info);
  87. return f_mysql_get_server_info(link_identifier);
  88. }
  89. inline Variant x_mysql_info(CVarRef link_identifier = null) {
  90. FUNCTION_INJECTION_BUILTIN(mysql_info);
  91. TAINT_OBSERVER(TAINT_BIT_MUTATED, TAINT_BIT_NONE);
  92. return f_mysql_info(link_identifier);
  93. }
  94. inline Variant x_mysql_insert_id(CVarRef link_identifier = null) {
  95. FUNCTION_INJECTION_BUILTIN(mysql_insert_id);
  96. return f_mysql_insert_id(link_identifier);
  97. }
  98. inline Variant x_mysql_stat(CVarRef link_identifier = null) {
  99. FUNCTION_INJECTION_BUILTIN(mysql_stat);
  100. TAINT_OBSERVER(TAINT_BIT_MUTATED, TAINT_BIT_NONE);
  101. return f_mysql_stat(link_identifier);
  102. }
  103. inline Variant x_mysql_thread_id(CVarRef link_identifier = null) {
  104. FUNCTION_INJECTION_BUILTIN(mysql_thread_id);
  105. return f_mysql_thread_id(link_identifier);
  106. }
  107. inline Variant x_mysql_create_db(CStrRef db, CVarRef link_identifier = null) {
  108. FUNCTION_INJECTION_BUILTIN(mysql_create_db);
  109. return f_mysql_create_db(db, link_identifier);
  110. }
  111. inline Variant x_mysql_select_db(CStrRef db, CVarRef link_identifier = null) {
  112. FUNCTION_INJECTION_BUILTIN(mysql_select_db);
  113. return f_mysql_select_db(db, link_identifier);
  114. }
  115. inline Variant x_mysql_drop_db(CStrRef db, CVarRef link_identifier = null) {
  116. FUNCTION_INJECTION_BUILTIN(mysql_drop_db);
  117. return f_mysql_drop_db(db, link_identifier);
  118. }
  119. inline Variant x_mysql_affected_rows(CVarRef link_identifier = null) {
  120. FUNCTION_INJECTION_BUILTIN(mysql_affected_rows);
  121. return f_mysql_affected_rows(link_identifier);
  122. }
  123. inline bool x_mysql_set_timeout(int query_timeout_ms = -1, CVarRef link_identifier = null) {
  124. FUNCTION_INJECTION_BUILTIN(mysql_set_timeout);
  125. return f_mysql_set_timeout(query_timeout_ms, link_identifier);
  126. }
  127. inline Variant x_mysql_query(CStrRef query, CVarRef link_identifier = null) {
  128. FUNCTION_INJECTION_BUILTIN(mysql_query);
  129. return f_mysql_query(query, link_identifier);
  130. }
  131. inline Variant x_mysql_multi_query(CStrRef query, CVarRef link_identifier = null) {
  132. FUNCTION_INJECTION_BUILTIN(mysql_multi_query);
  133. return f_mysql_multi_query(query, link_identifier);
  134. }
  135. inline bool x_mysql_next_result(CVarRef link_identifier = null) {
  136. FUNCTION_INJECTION_BUILTIN(mysql_next_result);
  137. return f_mysql_next_result(link_identifier);
  138. }
  139. inline bool x_mysql_more_results(CVarRef link_identifier = null) {
  140. FUNCTION_INJECTION_BUILTIN(mysql_more_results);
  141. return f_mysql_more_results(link_identifier);
  142. }
  143. inline Variant x_mysql_fetch_result(CVarRef link_identifier = null) {
  144. FUNCTION_INJECTION_BUILTIN(mysql_fetch_result);
  145. return f_mysql_fetch_result(link_identifier);
  146. }
  147. inline Variant x_mysql_unbuffered_query(CStrRef query, CVarRef link_identifier = null) {
  148. FUNCTION_INJECTION_BUILTIN(mysql_unbuffered_query);
  149. return f_mysql_unbuffered_query(query, link_identifier);
  150. }
  151. inline Variant x_mysql_db_query(CStrRef database, CStrRef query, CVarRef link_identifier = null) {
  152. FUNCTION_INJECTION_BUILTIN(mysql_db_query);
  153. return f_mysql_db_query(database, query, link_identifier);
  154. }
  155. inline Variant x_mysql_list_dbs(CVarRef link_identifier = null) {
  156. FUNCTION_INJECTION_BUILTIN(mysql_list_dbs);
  157. return f_mysql_list_dbs(link_identifier);
  158. }
  159. inline Variant x_mysql_list_tables(CStrRef database, CVarRef link_identifier = null) {
  160. FUNCTION_INJECTION_BUILTIN(mysql_list_tables);
  161. return f_mysql_list_tables(database, link_identifier);
  162. }
  163. inline Variant x_mysql_list_fields(CStrRef database_name, CStrRef table_name, CVarRef link_identifier = null) {
  164. FUNCTION_INJECTION_BUILTIN(mysql_list_fields);
  165. return f_mysql_list_fields(database_name, table_name, link_identifier);
  166. }
  167. inline Variant x_mysql_list_processes(CVarRef link_identifier = null) {
  168. FUNCTION_INJECTION_BUILTIN(mysql_list_processes);
  169. return f_mysql_list_processes(link_identifier);
  170. }
  171. inline Variant x_mysql_db_name(CVarRef result, int row, CVarRef field = null_variant) {
  172. FUNCTION_INJECTION_BUILTIN(mysql_db_name);
  173. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  174. return f_mysql_db_name(result, row, field);
  175. }
  176. inline Variant x_mysql_tablename(CVarRef result, int i) {
  177. FUNCTION_INJECTION_BUILTIN(mysql_tablename);
  178. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  179. return f_mysql_tablename(result, i);
  180. }
  181. inline Variant x_mysql_num_fields(CVarRef result) {
  182. FUNCTION_INJECTION_BUILTIN(mysql_num_fields);
  183. return f_mysql_num_fields(result);
  184. }
  185. inline Variant x_mysql_num_rows(CVarRef result) {
  186. FUNCTION_INJECTION_BUILTIN(mysql_num_rows);
  187. return f_mysql_num_rows(result);
  188. }
  189. inline Variant x_mysql_free_result(CVarRef result) {
  190. FUNCTION_INJECTION_BUILTIN(mysql_free_result);
  191. return f_mysql_free_result(result);
  192. }
  193. inline bool x_mysql_data_seek(CVarRef result, int row) {
  194. FUNCTION_INJECTION_BUILTIN(mysql_data_seek);
  195. return f_mysql_data_seek(result, row);
  196. }
  197. inline Variant x_mysql_fetch_row(CVarRef result) {
  198. FUNCTION_INJECTION_BUILTIN(mysql_fetch_row);
  199. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  200. return f_mysql_fetch_row(result);
  201. }
  202. inline Variant x_mysql_fetch_assoc(CVarRef result) {
  203. FUNCTION_INJECTION_BUILTIN(mysql_fetch_assoc);
  204. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  205. return f_mysql_fetch_assoc(result);
  206. }
  207. inline Variant x_mysql_fetch_array(CVarRef result, int result_type = 3) {
  208. FUNCTION_INJECTION_BUILTIN(mysql_fetch_array);
  209. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  210. return f_mysql_fetch_array(result, result_type);
  211. }
  212. inline Variant x_mysql_fetch_lengths(CVarRef result) {
  213. FUNCTION_INJECTION_BUILTIN(mysql_fetch_lengths);
  214. return f_mysql_fetch_lengths(result);
  215. }
  216. inline Variant x_mysql_fetch_object(CVarRef result, CStrRef class_name = "stdClass", CArrRef params = null) {
  217. FUNCTION_INJECTION_BUILTIN(mysql_fetch_object);
  218. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  219. return f_mysql_fetch_object(result, class_name, params);
  220. }
  221. inline Variant x_mysql_result(CVarRef result, int row, CVarRef field = null_variant) {
  222. FUNCTION_INJECTION_BUILTIN(mysql_result);
  223. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  224. return f_mysql_result(result, row, field);
  225. }
  226. inline Variant x_mysql_fetch_field(CVarRef result, int field = -1) {
  227. FUNCTION_INJECTION_BUILTIN(mysql_fetch_field);
  228. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  229. return f_mysql_fetch_field(result, field);
  230. }
  231. inline bool x_mysql_field_seek(CVarRef result, int field = 0) {
  232. FUNCTION_INJECTION_BUILTIN(mysql_field_seek);
  233. return f_mysql_field_seek(result, field);
  234. }
  235. inline Variant x_mysql_field_name(CVarRef result, int field = 0) {
  236. FUNCTION_INJECTION_BUILTIN(mysql_field_name);
  237. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  238. return f_mysql_field_name(result, field);
  239. }
  240. inline Variant x_mysql_field_table(CVarRef result, int field = 0) {
  241. FUNCTION_INJECTION_BUILTIN(mysql_field_table);
  242. TAINT_OBSERVER(TAINT_BIT_ALL, TAINT_BIT_NONE);
  243. return f_mysql_field_table(result, field);
  244. }
  245. inline Variant x_mysql_field_len(CVarRef result, int field = 0) {
  246. FUNCTION_INJECTION_BUILTIN(mysql_field_len);
  247. return f_mysql_field_len(result, field);
  248. }
  249. inline Variant x_mysql_field_type(CVarRef result, int field = 0) {
  250. FUNCTION_INJECTION_BUILTIN(mysql_field_type);
  251. return f_mysql_field_type(result, field);
  252. }
  253. inline Variant x_mysql_field_flags(CVarRef result, int field = 0) {
  254. FUNCTION_INJECTION_BUILTIN(mysql_field_flags);
  255. return f_mysql_field_flags(result, field);
  256. }
  257. ///////////////////////////////////////////////////////////////////////////////
  258. }
  259. #endif // __EXTPROFILE_MYSQL_H__