@@ -435,58 +435,61 @@ struct _pdo_dbh_t {
435
435
void *driver_data;
436
436
437
437
/* credentials */
438
- char *username, *password;
438
+ char *username;
439
+ char *password;
439
440
440
441
/* if true, then data stored and pointed at by this handle must all be
441
442
* persistently allocated */
442
- unsigned is_persistent:1 ;
443
+ bool is_persistent:1 ;
443
444
444
445
/* if true, driver should act as though a COMMIT were executed between
445
446
* each executed statement; otherwise, COMMIT must be carried out manually
446
447
* */
447
- unsigned auto_commit:1 ;
448
+ bool auto_commit:1 ;
448
449
449
450
/* if true, the handle has been closed and will not function anymore */
450
- unsigned is_closed:1 ;
451
+ bool is_closed:1 ;
451
452
452
453
/* if true, the driver requires that memory be allocated explicitly for
453
454
* the columns that are returned */
454
- unsigned alloc_own_columns:1 ;
455
+ bool alloc_own_columns:1 ;
455
456
456
457
/* if true, commit or rollBack is allowed to be called */
457
458
bool in_txn:1 ;
458
459
459
- /* max length a single character can become after correct quoting */
460
- unsigned max_escaped_char_length:3 ;
461
-
462
- /* oracle compat; see enum pdo_null_handling */
463
- unsigned oracle_nulls:2 ;
464
-
465
460
/* when set, convert int/floats to strings */
466
- unsigned stringify:1 ;
461
+ bool stringify:1 ;
467
462
468
463
/* bitmap for pdo_param_event(s) to skip in dispatch_param_event */
469
- unsigned skip_param_evt:7 ;
464
+ uint8_t skip_param_evt;
465
+
466
+ /* The PDO Error mode; see enum pdo_error_mode */
467
+ uint8_t error_mode;
468
+
469
+ /* oracle compat; see enum pdo_null_handling */
470
+ uint8_t oracle_nulls;
471
+
472
+ /* Case conversion; see enum pdo_case_conversion */
473
+ uint8_t native_case;
474
+ uint8_t desired_case;
470
475
471
- /* the sum of the number of bits here and the bit fields preceding should
472
- * equal 32 */
473
- unsigned _reserved_flags:14 ;
476
+ /* max length a single character can become after correct quoting */
477
+ uint8_t max_escaped_char_length;
474
478
475
479
/* data source string used to open this handle */
476
480
const char *data_source;
477
481
size_t data_source_len;
478
482
479
483
/* the global error code. */
480
484
pdo_error_type error_code;
481
-
482
- enum pdo_error_mode error_mode;
483
-
484
- enum pdo_case_conversion native_case, desired_case;
485
+ /* defaults for fetches */
486
+ uint16_t default_fetch_type;
485
487
486
488
/* persistent hash key associated with this handle */
487
489
const char *persistent_id;
488
490
size_t persistent_id_len;
489
- unsigned int refcount;
491
+
492
+ uint32_t refcount;
490
493
491
494
/* driver specific "class" methods for the dbh and stmt */
492
495
HashTable *cls_methods[PDO_DBH_DRIVER_METHOD_KIND__MAX];
@@ -503,9 +506,6 @@ struct _pdo_dbh_t {
503
506
* when PDO::query() fails */
504
507
pdo_stmt_t *query_stmt;
505
508
zend_object *query_stmt_obj;
506
-
507
- /* defaults for fetches */
508
- enum pdo_fetch_type default_fetch_type;
509
509
};
510
510
511
511
/* represents a connection to a database */
0 commit comments