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