- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/core/midgard/src/midgard_transaction.c
r22083 r22086 139 139 GdaConnection *cnc = _T_CNC(self); 140 140 141 if (!cnc) 142 return FALSE; 143 141 144 GdaTransactionStatus *status = 142 145 gda_connection_get_transaction_status(cnc); … … 163 166 MidgardTransaction *self = (MidgardTransaction *) instance; 164 167 165 self->name = (const gchar *)midgard_uuid_new(); 168 /* Point is to have unique name per transaction: 169 1. We do not use guid as MidgardConnection pointer is required for this. 170 2. SQLite has parser issues when transaction name begins with numeric value. 171 3. SQlite has parser issues when transaction name has dashes '-'. 172 That's why we create new 'mgd' prefixed uuid like string. */ 173 gchar *uuid = midgard_uuid_new(); 174 uuid = g_strdelimit(uuid, "-", '_'); 175 self->name = (const gchar *)g_strconcat("mgd", uuid, NULL); 176 g_free(uuid); 177 166 178 self->mgd = NULL; 167 179 } … … 181 193 gpointer g_class, gpointer g_class_data) 182 194 { 183 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class); 184 195 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class); 185 196 gobject_class->finalize = __midgard_transaction_finalize; 186 197 }
