Lines 1835-1841
real_prepare (GdaServerProvider *provide
Link Here
|
1835 |
return FALSE; |
1835 |
return FALSE; |
1836 |
} |
1836 |
} |
1837 |
|
1837 |
|
1838 |
my_bool update_max_length = 1; |
1838 |
_Bool update_max_length = 1; |
1839 |
if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) { |
1839 |
if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) { |
1840 |
_gda_mysql_make_error (cnc, NULL, mysql_stmt, error); |
1840 |
_gda_mysql_make_error (cnc, NULL, mysql_stmt, error); |
1841 |
mysql_stmt_close (mysql_stmt); |
1841 |
mysql_stmt_close (mysql_stmt); |
Lines 1941-1947
prepare_stmt_simple (MysqlConnectionData
Link Here
|
1941 |
return FALSE; |
1941 |
return FALSE; |
1942 |
} |
1942 |
} |
1943 |
|
1943 |
|
1944 |
my_bool update_max_length = 1; |
1944 |
_Bool update_max_length = 1; |
1945 |
if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) { |
1945 |
if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) { |
1946 |
_gda_mysql_make_error (cdata->cnc, NULL, mysql_stmt, error); |
1946 |
_gda_mysql_make_error (cdata->cnc, NULL, mysql_stmt, error); |
1947 |
mysql_stmt_close (mysql_stmt); |
1947 |
mysql_stmt_close (mysql_stmt); |
Lines 2327-2333
gda_mysql_provider_statement_execute (Gd
Link Here
|
2327 |
if (allow_noparam) { |
2327 |
if (allow_noparam) { |
2328 |
/* bind param to NULL */ |
2328 |
/* bind param to NULL */ |
2329 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2329 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2330 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2330 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2331 |
empty_rs = TRUE; |
2331 |
empty_rs = TRUE; |
2332 |
continue; |
2332 |
continue; |
2333 |
} |
2333 |
} |
Lines 2347-2353
gda_mysql_provider_statement_execute (Gd
Link Here
|
2347 |
if (allow_noparam) { |
2347 |
if (allow_noparam) { |
2348 |
/* bind param to NULL */ |
2348 |
/* bind param to NULL */ |
2349 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2349 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2350 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2350 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2351 |
empty_rs = TRUE; |
2351 |
empty_rs = TRUE; |
2352 |
continue; |
2352 |
continue; |
2353 |
} |
2353 |
} |
Lines 2399-2405
gda_mysql_provider_statement_execute (Gd
Link Here
|
2399 |
GdaStatement *rstmt; |
2399 |
GdaStatement *rstmt; |
2400 |
if (! gda_rewrite_statement_for_null_parameters (stmt, params, &rstmt, error)) { |
2400 |
if (! gda_rewrite_statement_for_null_parameters (stmt, params, &rstmt, error)) { |
2401 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2401 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2402 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2402 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2403 |
} |
2403 |
} |
2404 |
else if (!rstmt) |
2404 |
else if (!rstmt) |
2405 |
return NULL; |
2405 |
return NULL; |
Lines 2459-2465
gda_mysql_provider_statement_execute (Gd
Link Here
|
2459 |
ts = (GdaTimestamp*) gda_value_get_timestamp (value); |
2459 |
ts = (GdaTimestamp*) gda_value_get_timestamp (value); |
2460 |
if (!ts) { |
2460 |
if (!ts) { |
2461 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2461 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2462 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2462 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2463 |
} |
2463 |
} |
2464 |
else { |
2464 |
else { |
2465 |
_Bool tofree = FALSE; |
2465 |
_Bool tofree = FALSE; |
Lines 2495-2501
gda_mysql_provider_statement_execute (Gd
Link Here
|
2495 |
ts = (GdaTime*) gda_value_get_time (value); |
2495 |
ts = (GdaTime*) gda_value_get_time (value); |
2496 |
if (!ts) { |
2496 |
if (!ts) { |
2497 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2497 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2498 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2498 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2499 |
} |
2499 |
} |
2500 |
else { |
2500 |
else { |
2501 |
_Bool tofree = FALSE; |
2501 |
_Bool tofree = FALSE; |
Lines 2528-2534
gda_mysql_provider_statement_execute (Gd
Link Here
|
2528 |
ts = (GDate*) g_value_get_boxed (value); |
2528 |
ts = (GDate*) g_value_get_boxed (value); |
2529 |
if (!ts) { |
2529 |
if (!ts) { |
2530 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2530 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2531 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2531 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2532 |
} |
2532 |
} |
2533 |
else { |
2533 |
else { |
2534 |
MYSQL_TIME *mtime; |
2534 |
MYSQL_TIME *mtime; |
Lines 2548-2554
gda_mysql_provider_statement_execute (Gd
Link Here
|
2548 |
str = g_value_get_string (value); |
2548 |
str = g_value_get_string (value); |
2549 |
if (!str) { |
2549 |
if (!str) { |
2550 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2550 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2551 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2551 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2552 |
} |
2552 |
} |
2553 |
else { |
2553 |
else { |
2554 |
mysql_bind_param[i].buffer_type= MYSQL_TYPE_STRING; |
2554 |
mysql_bind_param[i].buffer_type= MYSQL_TYPE_STRING; |
Lines 2624-2630
gda_mysql_provider_statement_execute (Gd
Link Here
|
2624 |
bin = ((GdaBinary*) blob); |
2624 |
bin = ((GdaBinary*) blob); |
2625 |
if (!bin) { |
2625 |
if (!bin) { |
2626 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2626 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2627 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2627 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2628 |
} |
2628 |
} |
2629 |
else { |
2629 |
else { |
2630 |
gchar *str = NULL; |
2630 |
gchar *str = NULL; |
Lines 2665-2671
gda_mysql_provider_statement_execute (Gd
Link Here
|
2665 |
bin = gda_value_get_binary (value); |
2665 |
bin = gda_value_get_binary (value); |
2666 |
if (!bin) { |
2666 |
if (!bin) { |
2667 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2667 |
mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL; |
2668 |
mysql_bind_param[i].is_null = (my_bool*)1; |
2668 |
mysql_bind_param[i].is_null = (_Bool *) 1; |
2669 |
} |
2669 |
} |
2670 |
else { |
2670 |
else { |
2671 |
mysql_bind_param[i].buffer_type= MYSQL_TYPE_BLOB; |
2671 |
mysql_bind_param[i].buffer_type= MYSQL_TYPE_BLOB; |