aboutsummaryrefslogtreecommitdiff
blob: f30dbc91050cc5498f58328255656866dfd6e22e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
diff -urNp libgda-5.2.8-orig/providers/mysql/gda-mysql-provider.c libgda-5.2.8-dwok/providers/mysql/gda-mysql-provider.c
--- libgda-5.2.8-orig/providers/mysql/gda-mysql-provider.c	2019-08-21 12:47:26.763768166 +0200
+++ libgda-5.2.8-dwok/providers/mysql/gda-mysql-provider.c	2019-08-21 12:58:54.915575798 +0200
@@ -1835,7 +1835,7 @@ real_prepare (GdaServerProvider *provide
 		return FALSE;
 	}
 
-	my_bool update_max_length = 1;
+	_Bool update_max_length = 1;
 	if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) {
 		_gda_mysql_make_error (cnc, NULL, mysql_stmt, error);
 		mysql_stmt_close (mysql_stmt);
@@ -1941,7 +1941,7 @@ prepare_stmt_simple (MysqlConnectionData
 		return FALSE;
 	}
 
-	my_bool update_max_length = 1;
+	_Bool update_max_length = 1;
 	if (mysql_stmt_attr_set (mysql_stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void *) &update_max_length)) {
 		_gda_mysql_make_error (cdata->cnc, NULL, mysql_stmt, error);
 		mysql_stmt_close (mysql_stmt);
@@ -2327,7 +2327,7 @@ gda_mysql_provider_statement_execute (Gd
 			if (allow_noparam) {
                                 /* bind param to NULL */
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
                                 empty_rs = TRUE;
                                 continue;
 			}
@@ -2347,7 +2347,7 @@ gda_mysql_provider_statement_execute (Gd
 			if (allow_noparam) {
                                 /* bind param to NULL */
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
                                 empty_rs = TRUE;
                                 continue;
 			}
@@ -2399,7 +2399,7 @@ gda_mysql_provider_statement_execute (Gd
 			GdaStatement *rstmt;
 			if (! gda_rewrite_statement_for_null_parameters (stmt, params, &rstmt, error)) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else if (!rstmt)
 				return NULL;
@@ -2459,7 +2459,7 @@ gda_mysql_provider_statement_execute (Gd
 			ts = (GdaTimestamp*) gda_value_get_timestamp (value);
 			if (!ts) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				_Bool tofree = FALSE;
@@ -2495,7 +2495,7 @@ gda_mysql_provider_statement_execute (Gd
 			ts = (GdaTime*) gda_value_get_time (value);
 			if (!ts) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				_Bool tofree = FALSE;
@@ -2528,7 +2528,7 @@ gda_mysql_provider_statement_execute (Gd
 			ts = (GDate*) g_value_get_boxed (value);
 			if (!ts) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				MYSQL_TIME *mtime;
@@ -2548,7 +2548,7 @@ gda_mysql_provider_statement_execute (Gd
 			str = g_value_get_string (value);
 			if (!str) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				mysql_bind_param[i].buffer_type= MYSQL_TYPE_STRING;
@@ -2624,7 +2624,7 @@ gda_mysql_provider_statement_execute (Gd
 			bin = ((GdaBinary*) blob);
 			if (!bin) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				gchar *str = NULL;
@@ -2665,7 +2665,7 @@ gda_mysql_provider_statement_execute (Gd
 			bin = gda_value_get_binary (value);
 			if (!bin) {
 				mysql_bind_param[i].buffer_type = MYSQL_TYPE_NULL;
-				mysql_bind_param[i].is_null = (my_bool*)1;
+				mysql_bind_param[i].is_null = (_Bool *) 1;
 			}
 			else {
 				mysql_bind_param[i].buffer_type= MYSQL_TYPE_BLOB;
diff -urNp libgda-5.2.8-orig/providers/mysql/gda-mysql-recordset.c libgda-5.2.8-dwok/providers/mysql/gda-mysql-recordset.c
--- libgda-5.2.8-orig/providers/mysql/gda-mysql-recordset.c	2019-08-21 12:45:14.144430495 +0200
+++ libgda-5.2.8-dwok/providers/mysql/gda-mysql-recordset.c	2019-08-21 12:59:57.265383845 +0200
@@ -627,7 +627,7 @@ gda_mysql_recordset_new (GdaConnection
 		/* binding results with types */
 		mysql_bind_result[i].buffer_type = field->type;
 		mysql_bind_result[i].is_unsigned = field->flags & UNSIGNED_FLAG ? TRUE : FALSE;
-		mysql_bind_result[i].is_null = g_malloc0 (sizeof (my_bool));
+		mysql_bind_result[i].is_null = g_malloc0 (sizeof (_Bool));
 		
 		switch (mysql_bind_result[i].buffer_type) {
 		case MYSQL_TYPE_TINY:
@@ -753,7 +753,7 @@ new_row_from_mysql_stmt (GdaMysqlRecords
 
 		gint col;
 		for (col = 0; col < ((GdaDataSelect *) imodel)->prep_stmt->ncols; ++col) {
-			my_bool truncated;
+			_Bool truncated;
 			mysql_bind_result[col].error = &truncated;
 			mysql_stmt_fetch_column (imodel->priv->mysql_stmt, &(mysql_bind_result[col]),
 						 (unsigned int)col, 0);
@@ -784,10 +784,10 @@ new_row_from_mysql_stmt (GdaMysqlRecords
 		
 		/*g_print ("%s: #%d : TYPE=%d, GTYPE=%s\n", __func__, i, mysql_bind_result[i].buffer_type, g_type_name (type));*/
 
-		my_bool is_null = FALSE;
+		_Bool is_null = FALSE;
 		unsigned long length;
 		
-		memmove (&is_null, mysql_bind_result[i].is_null, sizeof (my_bool));
+		memmove (&is_null, mysql_bind_result[i].is_null, sizeof (_Bool));
 		if (is_null) {
 			gda_value_set_null (value);
 			continue;