datamapper 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. data/CHANGELOG +20 -1
  2. data/environment.rb +5 -3
  3. data/lib/data_mapper.rb +42 -23
  4. data/lib/data_mapper/adapters/data_object_adapter.rb +76 -73
  5. data/lib/data_mapper/adapters/mysql_adapter.rb +15 -1
  6. data/lib/data_mapper/adapters/postgresql_adapter.rb +1 -1
  7. data/lib/data_mapper/adapters/sql/commands/load_command.rb +242 -28
  8. data/lib/data_mapper/adapters/sql/mappings/column.rb +18 -1
  9. data/lib/data_mapper/adapters/sql/mappings/table.rb +20 -32
  10. data/lib/data_mapper/adapters/sql/quoting.rb +40 -7
  11. data/lib/data_mapper/adapters/sqlite3_adapter.rb +7 -1
  12. data/lib/data_mapper/associations/has_and_belongs_to_many_association.rb +6 -1
  13. data/lib/data_mapper/associations/has_many_association.rb +1 -1
  14. data/lib/data_mapper/context.rb +4 -2
  15. data/lib/data_mapper/database.rb +2 -12
  16. data/lib/data_mapper/support/active_record_impersonation.rb +1 -1
  17. data/lib/data_mapper/support/blank.rb +2 -2
  18. data/lib/data_mapper/support/serialization.rb +60 -4
  19. data/lib/data_mapper/support/string.rb +24 -2
  20. data/lib/data_mapper/validations/validation_errors.rb +6 -3
  21. data/performance.rb +20 -5
  22. data/plugins/dataobjects/Rakefile +2 -0
  23. data/plugins/dataobjects/do.rb +18 -8
  24. data/plugins/dataobjects/do_mysql.rb +57 -24
  25. data/plugins/dataobjects/do_postgres.rb +3 -7
  26. data/plugins/dataobjects/do_sqlite3.rb +18 -17
  27. data/plugins/dataobjects/swig_mysql/Makefile +146 -0
  28. data/plugins/dataobjects/swig_mysql/extconf.rb +13 -1
  29. data/plugins/dataobjects/swig_mysql/mkmf.log +24 -0
  30. data/plugins/dataobjects/swig_mysql/mysql_c.bundle +0 -0
  31. data/plugins/dataobjects/swig_mysql/mysql_c.c +303 -2501
  32. data/plugins/dataobjects/swig_mysql/mysql_c.i +63 -4
  33. data/plugins/dataobjects/swig_mysql/mysql_c.o +0 -0
  34. data/profile_data_mapper.rb +4 -4
  35. data/rakefile.rb +13 -7
  36. data/spec/acts_as_tree_spec.rb +2 -0
  37. data/spec/associations_spec.rb +12 -0
  38. data/spec/attributes_spec.rb +2 -0
  39. data/spec/base_spec.rb +2 -0
  40. data/spec/callbacks_spec.rb +2 -0
  41. data/spec/can_has_sphinx.rb +0 -1
  42. data/spec/coersion_spec.rb +10 -3
  43. data/spec/column_spec.rb +23 -0
  44. data/spec/conditions_spec.rb +18 -18
  45. data/spec/count_command_spec.rb +2 -0
  46. data/spec/dataobjects_spec.rb +26 -0
  47. data/spec/delete_command_spec.rb +2 -0
  48. data/spec/embedded_value_spec.rb +2 -0
  49. data/spec/fixtures/people.yaml +1 -1
  50. data/spec/fixtures/posts.yaml +3 -0
  51. data/spec/legacy_spec.rb +2 -0
  52. data/spec/load_command_spec.rb +28 -2
  53. data/spec/magic_columns_spec.rb +2 -0
  54. data/spec/models/person.rb +1 -1
  55. data/spec/models/post.rb +8 -0
  56. data/spec/query_spec.rb +2 -0
  57. data/spec/save_command_spec.rb +2 -0
  58. data/spec/schema_spec.rb +2 -0
  59. data/spec/serialization_spec.rb +58 -0
  60. data/spec/single_table_inheritance_spec.rb +2 -0
  61. data/spec/symbolic_operators_spec.rb +2 -0
  62. data/spec/validates_confirmation_of_spec.rb +2 -0
  63. data/spec/validates_format_of_spec.rb +2 -0
  64. data/spec/validates_length_of_spec.rb +2 -0
  65. data/spec/validates_uniqueness_of_spec.rb +2 -0
  66. data/spec/validations_spec.rb +2 -0
  67. data/tasks/fixtures.rb +15 -10
  68. metadata +10 -13
  69. data/lib/data_mapper/adapters/sql/commands/conditions.rb +0 -130
  70. data/lib/data_mapper/adapters/sql/commands/loader.rb +0 -99
  71. data/plugins/dataobjects/swig_mysql/do_mysql.bundle +0 -0
  72. data/spec/conversions_to_yaml_spec.rb +0 -17
@@ -998,10 +998,10 @@ extern "C" {
998
998
  /* Global Ruby hash table to store Trackings from C/C++
999
999
  structs to Ruby Objects. */
1000
1000
  static VALUE swig_ruby_trackings;
1001
-
1002
- /* Global variable that stores a reference to the ruby
1003
- hash table delete function. */
1004
- static ID swig_ruby_hash_delete = 0;
1001
+
1002
+ /* Global variable that stores a reference to the ruby
1003
+ hash table delete function. */
1004
+ static ID swig_ruby_hash_delete = 0;
1005
1005
 
1006
1006
  /* Setup a Ruby hash table to store Trackings */
1007
1007
  SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
@@ -1011,9 +1011,9 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1011
1011
  swig_ruby_trackings = rb_hash_new();
1012
1012
  rb_gc_register_address(&swig_ruby_trackings);
1013
1013
 
1014
- /* Now store a reference to the hash table delete function
1015
- so that we only have to look it up once.*/
1016
- swig_ruby_hash_delete = rb_intern("delete");
1014
+ /* Now store a reference to the hash table delete function
1015
+ so that we only have to look it up once.*/
1016
+ swig_ruby_hash_delete = rb_intern("delete");
1017
1017
  }
1018
1018
 
1019
1019
  /* Get a Ruby number to reference a pointer */
@@ -1552,25 +1552,24 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1552
1552
  #define SWIGTYPE_p_f_p_void_p_char_unsigned_int__int swig_types[25]
1553
1553
  #define SWIGTYPE_p_int swig_types[26]
1554
1554
  #define SWIGTYPE_p_p_char swig_types[27]
1555
- #define SWIGTYPE_p_st_dynamic_array swig_types[28]
1556
- #define SWIGTYPE_p_st_mysql swig_types[29]
1557
- #define SWIGTYPE_p_st_mysql_bind swig_types[30]
1558
- #define SWIGTYPE_p_st_mysql_data swig_types[31]
1559
- #define SWIGTYPE_p_st_mysql_field swig_types[32]
1560
- #define SWIGTYPE_p_st_mysql_manager swig_types[33]
1561
- #define SWIGTYPE_p_st_mysql_methods swig_types[34]
1562
- #define SWIGTYPE_p_st_mysql_options swig_types[35]
1563
- #define SWIGTYPE_p_st_mysql_parameters swig_types[36]
1564
- #define SWIGTYPE_p_st_mysql_res swig_types[37]
1565
- #define SWIGTYPE_p_st_mysql_rows swig_types[38]
1566
- #define SWIGTYPE_p_st_mysql_stmt swig_types[39]
1567
- #define SWIGTYPE_p_unsigned_char swig_types[40]
1568
- #define SWIGTYPE_p_unsigned_int swig_types[41]
1569
- #define SWIGTYPE_p_unsigned_long swig_types[42]
1570
- #define SWIGTYPE_p_unsigned_long_long swig_types[43]
1571
- #define SWIGTYPE_p_void swig_types[44]
1572
- static swig_type_info *swig_types[46];
1573
- static swig_module_info swig_module = {swig_types, 45, 0, 0, 0, 0};
1555
+ #define SWIGTYPE_p_st_mysql swig_types[28]
1556
+ #define SWIGTYPE_p_st_mysql_bind swig_types[29]
1557
+ #define SWIGTYPE_p_st_mysql_data swig_types[30]
1558
+ #define SWIGTYPE_p_st_mysql_field swig_types[31]
1559
+ #define SWIGTYPE_p_st_mysql_manager swig_types[32]
1560
+ #define SWIGTYPE_p_st_mysql_methods swig_types[33]
1561
+ #define SWIGTYPE_p_st_mysql_options swig_types[34]
1562
+ #define SWIGTYPE_p_st_mysql_parameters swig_types[35]
1563
+ #define SWIGTYPE_p_st_mysql_res swig_types[36]
1564
+ #define SWIGTYPE_p_st_mysql_rows swig_types[37]
1565
+ #define SWIGTYPE_p_st_mysql_stmt swig_types[38]
1566
+ #define SWIGTYPE_p_unsigned_char swig_types[39]
1567
+ #define SWIGTYPE_p_unsigned_int swig_types[40]
1568
+ #define SWIGTYPE_p_unsigned_long swig_types[41]
1569
+ #define SWIGTYPE_p_unsigned_long_long swig_types[42]
1570
+ #define SWIGTYPE_p_void swig_types[43]
1571
+ static swig_type_info *swig_types[45];
1572
+ static swig_module_info swig_module = {swig_types, 44, 0, 0, 0, 0};
1574
1573
  #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1575
1574
  #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1576
1575
 
@@ -1589,9 +1588,41 @@ static VALUE mMysql_c;
1589
1588
  #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1590
1589
 
1591
1590
 
1592
- #include <mysql.h>
1593
- #include <errmsg.h>
1594
- #include <mysqld_error.h>
1591
+ #include <mysql.h>
1592
+ #include <errmsg.h>
1593
+ #include <mysqld_error.h>
1594
+
1595
+ VALUE mysql_c_fetch_field_names(MYSQL_RES *reader, int count) {
1596
+ VALUE arr = rb_ary_new();
1597
+ int i;
1598
+ for(i = 0; i < count; i++) {
1599
+ rb_ary_push(arr, rb_str_new2(mysql_fetch_field_direct(reader, i)->name));
1600
+ }
1601
+ return arr;
1602
+ }
1603
+
1604
+ VALUE mysql_c_fetch_field_types(MYSQL_RES *reader, int count) {
1605
+ VALUE arr = rb_ary_new();
1606
+ int i;
1607
+ for(i = 0; i < count; i++) {
1608
+ rb_ary_push(arr, INT2NUM(mysql_fetch_field_direct(reader, i)->type));
1609
+ }
1610
+ return arr;
1611
+ }
1612
+
1613
+ VALUE mysql_c_fetch_row(MYSQL_RES *reader) {
1614
+ VALUE arr = rb_ary_new();
1615
+ MYSQL_ROW result = (MYSQL_ROW)mysql_fetch_row(reader);
1616
+ if(!result) return Qnil;
1617
+ int i;
1618
+
1619
+ for(i = 0; i < reader->field_count; i++) {
1620
+ if(result[i] == NULL) rb_ary_push(arr, Qnil);
1621
+ else rb_ary_push(arr, rb_str_new2(result[i]));
1622
+ }
1623
+ return arr;
1624
+ }
1625
+
1595
1626
 
1596
1627
 
1597
1628
  #include <limits.h>
@@ -3314,2293 +3345,68 @@ fail:
3314
3345
  }
3315
3346
 
3316
3347
 
3317
- #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3318
- SWIGINTERN VALUE
3319
- _wrap_MYSQL_ROWS_allocate(VALUE self) {
3320
- #else
3321
- SWIGINTERN VALUE
3322
- _wrap_MYSQL_ROWS_allocate(int argc, VALUE *argv, VALUE self) {
3323
- #endif
3324
-
3325
-
3326
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_st_mysql_rows);
3327
- #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3328
- rb_obj_call_init(vresult, argc, argv);
3329
- #endif
3330
- return vresult;
3331
- }
3332
-
3333
-
3334
- SWIGINTERN VALUE
3335
- _wrap_new_MYSQL_ROWS(int argc, VALUE *argv, VALUE self) {
3336
- MYSQL_ROWS *result = 0 ;
3337
-
3338
- if ((argc < 0) || (argc > 0)) {
3339
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3340
- }
3341
- result = (MYSQL_ROWS *)(MYSQL_ROWS *) calloc(1, sizeof(MYSQL_ROWS));DATA_PTR(self) = result;
3342
-
3343
- return self;
3344
- fail:
3345
- return Qnil;
3346
- }
3347
-
3348
-
3349
- SWIGINTERN void
3350
- free_MYSQL_ROWS(MYSQL_ROWS *arg1) {
3351
- free((char *) arg1);
3352
- }
3353
-
3354
- swig_class cMYSQL_DATA;
3355
-
3356
- SWIGINTERN VALUE
3357
- _wrap_MYSQL_DATA_rows_set(int argc, VALUE *argv, VALUE self) {
3358
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3359
- my_ulonglong arg2 ;
3360
- void *argp1 = 0 ;
3361
- int res1 = 0 ;
3362
- unsigned long long val2 ;
3363
- int ecode2 = 0 ;
3364
-
3365
- if ((argc < 1) || (argc > 1)) {
3366
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3367
- }
3368
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3369
- if (!SWIG_IsOK(res1)) {
3370
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rows" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3371
- }
3372
- arg1 = (MYSQL_DATA *)(argp1);
3373
- ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2);
3374
- if (!SWIG_IsOK(ecode2)) {
3375
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rows" "', argument " "2"" of type '" "my_ulonglong""'");
3376
- }
3377
- arg2 = (my_ulonglong)(val2);
3378
- if (arg1) (arg1)->rows = arg2;
3379
-
3380
- return Qnil;
3381
- fail:
3382
- return Qnil;
3383
- }
3384
-
3385
-
3386
- SWIGINTERN VALUE
3387
- _wrap_MYSQL_DATA_rows_get(int argc, VALUE *argv, VALUE self) {
3388
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3389
- my_ulonglong result;
3390
- void *argp1 = 0 ;
3391
- int res1 = 0 ;
3392
- VALUE vresult = Qnil;
3393
-
3394
- if ((argc < 0) || (argc > 0)) {
3395
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3396
- }
3397
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3398
- if (!SWIG_IsOK(res1)) {
3399
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rows" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3400
- }
3401
- arg1 = (MYSQL_DATA *)(argp1);
3402
- result = (my_ulonglong) ((arg1)->rows);
3403
- vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
3404
- return vresult;
3405
- fail:
3406
- return Qnil;
3407
- }
3408
-
3409
-
3410
- SWIGINTERN VALUE
3411
- _wrap_MYSQL_DATA_fields_set(int argc, VALUE *argv, VALUE self) {
3412
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3413
- unsigned int arg2 ;
3414
- void *argp1 = 0 ;
3415
- int res1 = 0 ;
3416
- unsigned int val2 ;
3417
- int ecode2 = 0 ;
3418
-
3419
- if ((argc < 1) || (argc > 1)) {
3420
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3421
- }
3422
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3423
- if (!SWIG_IsOK(res1)) {
3424
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3425
- }
3426
- arg1 = (MYSQL_DATA *)(argp1);
3427
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3428
- if (!SWIG_IsOK(ecode2)) {
3429
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields" "', argument " "2"" of type '" "unsigned int""'");
3430
- }
3431
- arg2 = (unsigned int)(val2);
3432
- if (arg1) (arg1)->fields = arg2;
3433
-
3434
- return Qnil;
3435
- fail:
3436
- return Qnil;
3437
- }
3438
-
3439
-
3440
- SWIGINTERN VALUE
3441
- _wrap_MYSQL_DATA_fields_get(int argc, VALUE *argv, VALUE self) {
3442
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3443
- unsigned int result;
3444
- void *argp1 = 0 ;
3445
- int res1 = 0 ;
3446
- VALUE vresult = Qnil;
3447
-
3448
- if ((argc < 0) || (argc > 0)) {
3449
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3450
- }
3451
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3452
- if (!SWIG_IsOK(res1)) {
3453
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3454
- }
3455
- arg1 = (MYSQL_DATA *)(argp1);
3456
- result = (unsigned int) ((arg1)->fields);
3457
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3458
- return vresult;
3459
- fail:
3460
- return Qnil;
3461
- }
3462
-
3463
-
3464
- SWIGINTERN VALUE
3465
- _wrap_MYSQL_DATA_data_set(int argc, VALUE *argv, VALUE self) {
3466
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3467
- MYSQL_ROWS *arg2 = (MYSQL_ROWS *) 0 ;
3468
- void *argp1 = 0 ;
3469
- int res1 = 0 ;
3470
- void *argp2 = 0 ;
3471
- int res2 = 0 ;
3472
-
3473
- if ((argc < 1) || (argc > 1)) {
3474
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3475
- }
3476
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3477
- if (!SWIG_IsOK(res1)) {
3478
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3479
- }
3480
- arg1 = (MYSQL_DATA *)(argp1);
3481
- res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_st_mysql_rows, SWIG_POINTER_DISOWN | 0 );
3482
- if (!SWIG_IsOK(res2)) {
3483
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "data" "', argument " "2"" of type '" "MYSQL_ROWS *""'");
3484
- }
3485
- arg2 = (MYSQL_ROWS *)(argp2);
3486
- if (arg1) (arg1)->data = arg2;
3487
-
3488
- return Qnil;
3489
- fail:
3490
- return Qnil;
3491
- }
3492
-
3493
-
3494
- SWIGINTERN VALUE
3495
- _wrap_MYSQL_DATA_data_get(int argc, VALUE *argv, VALUE self) {
3496
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3497
- MYSQL_ROWS *result = 0 ;
3498
- void *argp1 = 0 ;
3499
- int res1 = 0 ;
3500
- VALUE vresult = Qnil;
3501
-
3502
- if ((argc < 0) || (argc > 0)) {
3503
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3504
- }
3505
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3506
- if (!SWIG_IsOK(res1)) {
3507
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3508
- }
3509
- arg1 = (MYSQL_DATA *)(argp1);
3510
- result = (MYSQL_ROWS *) ((arg1)->data);
3511
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_st_mysql_rows, 0 | 0 );
3512
- return vresult;
3513
- fail:
3514
- return Qnil;
3515
- }
3516
-
3517
-
3518
- SWIGINTERN VALUE
3519
- _wrap_MYSQL_DATA_alloc_set(int argc, VALUE *argv, VALUE self) {
3520
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3521
- MEM_ROOT arg2 ;
3522
- void *argp1 = 0 ;
3523
- int res1 = 0 ;
3524
- void *argp2 ;
3525
- int res2 = 0 ;
3526
-
3527
- if ((argc < 1) || (argc > 1)) {
3528
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3529
- }
3530
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3531
- if (!SWIG_IsOK(res1)) {
3532
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "alloc" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3533
- }
3534
- arg1 = (MYSQL_DATA *)(argp1);
3535
- {
3536
- res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_MEM_ROOT, 0 );
3537
- if (!SWIG_IsOK(res2)) {
3538
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "alloc" "', argument " "2"" of type '" "MEM_ROOT""'");
3539
- }
3540
- if (!argp2) {
3541
- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "alloc" "', argument " "2"" of type '" "MEM_ROOT""'");
3542
- } else {
3543
- arg2 = *((MEM_ROOT *)(argp2));
3544
- }
3545
- }
3546
- if (arg1) (arg1)->alloc = arg2;
3547
-
3548
- return Qnil;
3549
- fail:
3550
- return Qnil;
3551
- }
3552
-
3553
-
3554
- SWIGINTERN VALUE
3555
- _wrap_MYSQL_DATA_alloc_get(int argc, VALUE *argv, VALUE self) {
3556
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3557
- MEM_ROOT result;
3558
- void *argp1 = 0 ;
3559
- int res1 = 0 ;
3560
- VALUE vresult = Qnil;
3561
-
3562
- if ((argc < 0) || (argc > 0)) {
3563
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3564
- }
3565
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3566
- if (!SWIG_IsOK(res1)) {
3567
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "alloc" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3568
- }
3569
- arg1 = (MYSQL_DATA *)(argp1);
3570
- result = ((arg1)->alloc);
3571
- vresult = SWIG_NewPointerObj((MEM_ROOT *)memcpy((MEM_ROOT *)malloc(sizeof(MEM_ROOT)),&result,sizeof(MEM_ROOT)), SWIGTYPE_p_MEM_ROOT, SWIG_POINTER_OWN | 0 );
3572
- return vresult;
3573
- fail:
3574
- return Qnil;
3575
- }
3576
-
3577
-
3578
- SWIGINTERN VALUE
3579
- _wrap_MYSQL_DATA_embedded_info_set(int argc, VALUE *argv, VALUE self) {
3580
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3581
- struct embedded_query_result *arg2 = (struct embedded_query_result *) 0 ;
3582
- void *argp1 = 0 ;
3583
- int res1 = 0 ;
3584
- void *argp2 = 0 ;
3585
- int res2 = 0 ;
3586
-
3587
- if ((argc < 1) || (argc > 1)) {
3588
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3589
- }
3590
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3591
- if (!SWIG_IsOK(res1)) {
3592
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "embedded_info" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3593
- }
3594
- arg1 = (MYSQL_DATA *)(argp1);
3595
- res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_embedded_query_result, SWIG_POINTER_DISOWN | 0 );
3596
- if (!SWIG_IsOK(res2)) {
3597
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "embedded_info" "', argument " "2"" of type '" "struct embedded_query_result *""'");
3598
- }
3599
- arg2 = (struct embedded_query_result *)(argp2);
3600
- if (arg1) (arg1)->embedded_info = arg2;
3601
-
3602
- return Qnil;
3603
- fail:
3604
- return Qnil;
3605
- }
3606
-
3607
-
3608
- SWIGINTERN VALUE
3609
- _wrap_MYSQL_DATA_embedded_info_get(int argc, VALUE *argv, VALUE self) {
3610
- MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3611
- struct embedded_query_result *result = 0 ;
3612
- void *argp1 = 0 ;
3613
- int res1 = 0 ;
3614
- VALUE vresult = Qnil;
3615
-
3616
- if ((argc < 0) || (argc > 0)) {
3617
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3618
- }
3619
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
3620
- if (!SWIG_IsOK(res1)) {
3621
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "embedded_info" "', argument " "1"" of type '" "MYSQL_DATA *""'");
3622
- }
3623
- arg1 = (MYSQL_DATA *)(argp1);
3624
- result = (struct embedded_query_result *) ((arg1)->embedded_info);
3625
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_embedded_query_result, 0 | 0 );
3626
- return vresult;
3627
- fail:
3628
- return Qnil;
3629
- }
3630
-
3631
-
3632
- #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
3633
- SWIGINTERN VALUE
3634
- _wrap_MYSQL_DATA_allocate(VALUE self) {
3635
- #else
3636
- SWIGINTERN VALUE
3637
- _wrap_MYSQL_DATA_allocate(int argc, VALUE *argv, VALUE self) {
3638
- #endif
3639
-
3640
-
3641
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_st_mysql_data);
3642
- #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3643
- rb_obj_call_init(vresult, argc, argv);
3644
- #endif
3645
- return vresult;
3646
- }
3647
-
3648
-
3649
- SWIGINTERN VALUE
3650
- _wrap_new_MYSQL_DATA(int argc, VALUE *argv, VALUE self) {
3651
- MYSQL_DATA *result = 0 ;
3652
-
3653
- if ((argc < 0) || (argc > 0)) {
3654
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3655
- }
3656
- result = (MYSQL_DATA *)(MYSQL_DATA *) calloc(1, sizeof(MYSQL_DATA));DATA_PTR(self) = result;
3657
-
3658
- return self;
3659
- fail:
3660
- return Qnil;
3661
- }
3662
-
3663
-
3664
- SWIGINTERN void
3665
- free_MYSQL_DATA(MYSQL_DATA *arg1) {
3666
- free((char *) arg1);
3667
- }
3668
-
3669
- swig_class cSt_mysql_options;
3670
-
3671
- SWIGINTERN VALUE
3672
- _wrap_st_mysql_options_connect_timeout_set(int argc, VALUE *argv, VALUE self) {
3673
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3674
- unsigned int arg2 ;
3675
- void *argp1 = 0 ;
3676
- int res1 = 0 ;
3677
- unsigned int val2 ;
3678
- int ecode2 = 0 ;
3679
-
3680
- if ((argc < 1) || (argc > 1)) {
3681
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3682
- }
3683
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3684
- if (!SWIG_IsOK(res1)) {
3685
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connect_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3686
- }
3687
- arg1 = (struct st_mysql_options *)(argp1);
3688
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3689
- if (!SWIG_IsOK(ecode2)) {
3690
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "connect_timeout" "', argument " "2"" of type '" "unsigned int""'");
3691
- }
3692
- arg2 = (unsigned int)(val2);
3693
- if (arg1) (arg1)->connect_timeout = arg2;
3694
-
3695
- return Qnil;
3696
- fail:
3697
- return Qnil;
3698
- }
3699
-
3700
-
3701
- SWIGINTERN VALUE
3702
- _wrap_st_mysql_options_connect_timeout_get(int argc, VALUE *argv, VALUE self) {
3703
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3704
- unsigned int result;
3705
- void *argp1 = 0 ;
3706
- int res1 = 0 ;
3707
- VALUE vresult = Qnil;
3708
-
3709
- if ((argc < 0) || (argc > 0)) {
3710
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3711
- }
3712
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3713
- if (!SWIG_IsOK(res1)) {
3714
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "connect_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3715
- }
3716
- arg1 = (struct st_mysql_options *)(argp1);
3717
- result = (unsigned int) ((arg1)->connect_timeout);
3718
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3719
- return vresult;
3720
- fail:
3721
- return Qnil;
3722
- }
3723
-
3724
-
3725
- SWIGINTERN VALUE
3726
- _wrap_st_mysql_options_read_timeout_set(int argc, VALUE *argv, VALUE self) {
3727
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3728
- unsigned int arg2 ;
3729
- void *argp1 = 0 ;
3730
- int res1 = 0 ;
3731
- unsigned int val2 ;
3732
- int ecode2 = 0 ;
3733
-
3734
- if ((argc < 1) || (argc > 1)) {
3735
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3736
- }
3737
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3738
- if (!SWIG_IsOK(res1)) {
3739
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3740
- }
3741
- arg1 = (struct st_mysql_options *)(argp1);
3742
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3743
- if (!SWIG_IsOK(ecode2)) {
3744
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_timeout" "', argument " "2"" of type '" "unsigned int""'");
3745
- }
3746
- arg2 = (unsigned int)(val2);
3747
- if (arg1) (arg1)->read_timeout = arg2;
3748
-
3749
- return Qnil;
3750
- fail:
3751
- return Qnil;
3752
- }
3753
-
3754
-
3755
- SWIGINTERN VALUE
3756
- _wrap_st_mysql_options_read_timeout_get(int argc, VALUE *argv, VALUE self) {
3757
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3758
- unsigned int result;
3759
- void *argp1 = 0 ;
3760
- int res1 = 0 ;
3761
- VALUE vresult = Qnil;
3762
-
3763
- if ((argc < 0) || (argc > 0)) {
3764
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3765
- }
3766
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3767
- if (!SWIG_IsOK(res1)) {
3768
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3769
- }
3770
- arg1 = (struct st_mysql_options *)(argp1);
3771
- result = (unsigned int) ((arg1)->read_timeout);
3772
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3773
- return vresult;
3774
- fail:
3775
- return Qnil;
3776
- }
3777
-
3778
-
3779
- SWIGINTERN VALUE
3780
- _wrap_st_mysql_options_write_timeout_set(int argc, VALUE *argv, VALUE self) {
3781
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3782
- unsigned int arg2 ;
3783
- void *argp1 = 0 ;
3784
- int res1 = 0 ;
3785
- unsigned int val2 ;
3786
- int ecode2 = 0 ;
3787
-
3788
- if ((argc < 1) || (argc > 1)) {
3789
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3790
- }
3791
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3792
- if (!SWIG_IsOK(res1)) {
3793
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3794
- }
3795
- arg1 = (struct st_mysql_options *)(argp1);
3796
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3797
- if (!SWIG_IsOK(ecode2)) {
3798
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "write_timeout" "', argument " "2"" of type '" "unsigned int""'");
3799
- }
3800
- arg2 = (unsigned int)(val2);
3801
- if (arg1) (arg1)->write_timeout = arg2;
3802
-
3803
- return Qnil;
3804
- fail:
3805
- return Qnil;
3806
- }
3807
-
3808
-
3809
- SWIGINTERN VALUE
3810
- _wrap_st_mysql_options_write_timeout_get(int argc, VALUE *argv, VALUE self) {
3811
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3812
- unsigned int result;
3813
- void *argp1 = 0 ;
3814
- int res1 = 0 ;
3815
- VALUE vresult = Qnil;
3816
-
3817
- if ((argc < 0) || (argc > 0)) {
3818
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3819
- }
3820
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3821
- if (!SWIG_IsOK(res1)) {
3822
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_timeout" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3823
- }
3824
- arg1 = (struct st_mysql_options *)(argp1);
3825
- result = (unsigned int) ((arg1)->write_timeout);
3826
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3827
- return vresult;
3828
- fail:
3829
- return Qnil;
3830
- }
3831
-
3832
-
3833
- SWIGINTERN VALUE
3834
- _wrap_st_mysql_options_port_set(int argc, VALUE *argv, VALUE self) {
3835
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3836
- unsigned int arg2 ;
3837
- void *argp1 = 0 ;
3838
- int res1 = 0 ;
3839
- unsigned int val2 ;
3840
- int ecode2 = 0 ;
3841
-
3842
- if ((argc < 1) || (argc > 1)) {
3843
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3844
- }
3845
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3846
- if (!SWIG_IsOK(res1)) {
3847
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "port" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3848
- }
3849
- arg1 = (struct st_mysql_options *)(argp1);
3850
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3851
- if (!SWIG_IsOK(ecode2)) {
3852
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "port" "', argument " "2"" of type '" "unsigned int""'");
3853
- }
3854
- arg2 = (unsigned int)(val2);
3855
- if (arg1) (arg1)->port = arg2;
3856
-
3857
- return Qnil;
3858
- fail:
3859
- return Qnil;
3860
- }
3861
-
3862
-
3863
- SWIGINTERN VALUE
3864
- _wrap_st_mysql_options_port_get(int argc, VALUE *argv, VALUE self) {
3865
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3866
- unsigned int result;
3867
- void *argp1 = 0 ;
3868
- int res1 = 0 ;
3869
- VALUE vresult = Qnil;
3870
-
3871
- if ((argc < 0) || (argc > 0)) {
3872
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3873
- }
3874
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3875
- if (!SWIG_IsOK(res1)) {
3876
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "port" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3877
- }
3878
- arg1 = (struct st_mysql_options *)(argp1);
3879
- result = (unsigned int) ((arg1)->port);
3880
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3881
- return vresult;
3882
- fail:
3883
- return Qnil;
3884
- }
3885
-
3886
-
3887
- SWIGINTERN VALUE
3888
- _wrap_st_mysql_options_protocol_set(int argc, VALUE *argv, VALUE self) {
3889
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3890
- unsigned int arg2 ;
3891
- void *argp1 = 0 ;
3892
- int res1 = 0 ;
3893
- unsigned int val2 ;
3894
- int ecode2 = 0 ;
3895
-
3896
- if ((argc < 1) || (argc > 1)) {
3897
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3898
- }
3899
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3900
- if (!SWIG_IsOK(res1)) {
3901
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "protocol" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3902
- }
3903
- arg1 = (struct st_mysql_options *)(argp1);
3904
- ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3905
- if (!SWIG_IsOK(ecode2)) {
3906
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "protocol" "', argument " "2"" of type '" "unsigned int""'");
3907
- }
3908
- arg2 = (unsigned int)(val2);
3909
- if (arg1) (arg1)->protocol = arg2;
3910
-
3911
- return Qnil;
3912
- fail:
3913
- return Qnil;
3914
- }
3915
-
3916
-
3917
- SWIGINTERN VALUE
3918
- _wrap_st_mysql_options_protocol_get(int argc, VALUE *argv, VALUE self) {
3919
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3920
- unsigned int result;
3921
- void *argp1 = 0 ;
3922
- int res1 = 0 ;
3923
- VALUE vresult = Qnil;
3924
-
3925
- if ((argc < 0) || (argc > 0)) {
3926
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3927
- }
3928
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3929
- if (!SWIG_IsOK(res1)) {
3930
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "protocol" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3931
- }
3932
- arg1 = (struct st_mysql_options *)(argp1);
3933
- result = (unsigned int) ((arg1)->protocol);
3934
- vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
3935
- return vresult;
3936
- fail:
3937
- return Qnil;
3938
- }
3939
-
3940
-
3941
- SWIGINTERN VALUE
3942
- _wrap_st_mysql_options_client_flag_set(int argc, VALUE *argv, VALUE self) {
3943
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3944
- unsigned long arg2 ;
3945
- void *argp1 = 0 ;
3946
- int res1 = 0 ;
3947
- unsigned long val2 ;
3948
- int ecode2 = 0 ;
3949
-
3950
- if ((argc < 1) || (argc > 1)) {
3951
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
3952
- }
3953
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3954
- if (!SWIG_IsOK(res1)) {
3955
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "client_flag" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3956
- }
3957
- arg1 = (struct st_mysql_options *)(argp1);
3958
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[0], &val2);
3959
- if (!SWIG_IsOK(ecode2)) {
3960
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "client_flag" "', argument " "2"" of type '" "unsigned long""'");
3961
- }
3962
- arg2 = (unsigned long)(val2);
3963
- if (arg1) (arg1)->client_flag = arg2;
3964
-
3965
- return Qnil;
3966
- fail:
3967
- return Qnil;
3968
- }
3969
-
3970
-
3971
- SWIGINTERN VALUE
3972
- _wrap_st_mysql_options_client_flag_get(int argc, VALUE *argv, VALUE self) {
3973
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3974
- unsigned long result;
3975
- void *argp1 = 0 ;
3976
- int res1 = 0 ;
3977
- VALUE vresult = Qnil;
3978
-
3979
- if ((argc < 0) || (argc > 0)) {
3980
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
3981
- }
3982
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3983
- if (!SWIG_IsOK(res1)) {
3984
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "client_flag" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3985
- }
3986
- arg1 = (struct st_mysql_options *)(argp1);
3987
- result = (unsigned long) ((arg1)->client_flag);
3988
- vresult = SWIG_From_unsigned_SS_long((unsigned long)(result));
3989
- return vresult;
3990
- fail:
3991
- return Qnil;
3992
- }
3993
-
3994
-
3995
- SWIGINTERN VALUE
3996
- _wrap_st_mysql_options_host_set(int argc, VALUE *argv, VALUE self) {
3997
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
3998
- char *arg2 = (char *) 0 ;
3999
- void *argp1 = 0 ;
4000
- int res1 = 0 ;
4001
- int res2 ;
4002
- char *buf2 = 0 ;
4003
- int alloc2 = 0 ;
4004
-
4005
- if ((argc < 1) || (argc > 1)) {
4006
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4007
- }
4008
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4009
- if (!SWIG_IsOK(res1)) {
4010
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "host" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4011
- }
4012
- arg1 = (struct st_mysql_options *)(argp1);
4013
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4014
- if (!SWIG_IsOK(res2)) {
4015
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "host" "', argument " "2"" of type '" "char *""'");
4016
- }
4017
- arg2 = (char *)(buf2);
4018
- if (arg1->host) free((char*)arg1->host);
4019
- if (arg2) {
4020
- size_t size = strlen((const char *)(arg2)) + 1;
4021
- arg1->host = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4022
- } else {
4023
- arg1->host = 0;
4024
- }
4025
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4026
- return Qnil;
4027
- fail:
4028
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4029
- return Qnil;
4030
- }
4031
-
4032
-
4033
- SWIGINTERN VALUE
4034
- _wrap_st_mysql_options_host_get(int argc, VALUE *argv, VALUE self) {
4035
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4036
- char *result = 0 ;
4037
- void *argp1 = 0 ;
4038
- int res1 = 0 ;
4039
- VALUE vresult = Qnil;
4040
-
4041
- if ((argc < 0) || (argc > 0)) {
4042
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4043
- }
4044
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4045
- if (!SWIG_IsOK(res1)) {
4046
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "host" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4047
- }
4048
- arg1 = (struct st_mysql_options *)(argp1);
4049
- result = (char *) ((arg1)->host);
4050
- vresult = SWIG_FromCharPtr((const char *)result);
4051
- return vresult;
4052
- fail:
4053
- return Qnil;
4054
- }
4055
-
4056
-
4057
- SWIGINTERN VALUE
4058
- _wrap_st_mysql_options_user_set(int argc, VALUE *argv, VALUE self) {
4059
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4060
- char *arg2 = (char *) 0 ;
4061
- void *argp1 = 0 ;
4062
- int res1 = 0 ;
4063
- int res2 ;
4064
- char *buf2 = 0 ;
4065
- int alloc2 = 0 ;
4066
-
4067
- if ((argc < 1) || (argc > 1)) {
4068
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4069
- }
4070
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4071
- if (!SWIG_IsOK(res1)) {
4072
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4073
- }
4074
- arg1 = (struct st_mysql_options *)(argp1);
4075
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4076
- if (!SWIG_IsOK(res2)) {
4077
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "user" "', argument " "2"" of type '" "char *""'");
4078
- }
4079
- arg2 = (char *)(buf2);
4080
- if (arg1->user) free((char*)arg1->user);
4081
- if (arg2) {
4082
- size_t size = strlen((const char *)(arg2)) + 1;
4083
- arg1->user = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4084
- } else {
4085
- arg1->user = 0;
4086
- }
4087
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4088
- return Qnil;
4089
- fail:
4090
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4091
- return Qnil;
4092
- }
4093
-
4094
-
4095
- SWIGINTERN VALUE
4096
- _wrap_st_mysql_options_user_get(int argc, VALUE *argv, VALUE self) {
4097
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4098
- char *result = 0 ;
4099
- void *argp1 = 0 ;
4100
- int res1 = 0 ;
4101
- VALUE vresult = Qnil;
4102
-
4103
- if ((argc < 0) || (argc > 0)) {
4104
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4105
- }
4106
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4107
- if (!SWIG_IsOK(res1)) {
4108
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4109
- }
4110
- arg1 = (struct st_mysql_options *)(argp1);
4111
- result = (char *) ((arg1)->user);
4112
- vresult = SWIG_FromCharPtr((const char *)result);
4113
- return vresult;
4114
- fail:
4115
- return Qnil;
4116
- }
4117
-
4118
-
4119
- SWIGINTERN VALUE
4120
- _wrap_st_mysql_options_password_set(int argc, VALUE *argv, VALUE self) {
4121
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4122
- char *arg2 = (char *) 0 ;
4123
- void *argp1 = 0 ;
4124
- int res1 = 0 ;
4125
- int res2 ;
4126
- char *buf2 = 0 ;
4127
- int alloc2 = 0 ;
4128
-
4129
- if ((argc < 1) || (argc > 1)) {
4130
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4131
- }
4132
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4133
- if (!SWIG_IsOK(res1)) {
4134
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "password" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4135
- }
4136
- arg1 = (struct st_mysql_options *)(argp1);
4137
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4138
- if (!SWIG_IsOK(res2)) {
4139
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "password" "', argument " "2"" of type '" "char *""'");
4140
- }
4141
- arg2 = (char *)(buf2);
4142
- if (arg1->password) free((char*)arg1->password);
4143
- if (arg2) {
4144
- size_t size = strlen((const char *)(arg2)) + 1;
4145
- arg1->password = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4146
- } else {
4147
- arg1->password = 0;
4148
- }
4149
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4150
- return Qnil;
4151
- fail:
4152
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4153
- return Qnil;
4154
- }
4155
-
4156
-
4157
- SWIGINTERN VALUE
4158
- _wrap_st_mysql_options_password_get(int argc, VALUE *argv, VALUE self) {
4159
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4160
- char *result = 0 ;
4161
- void *argp1 = 0 ;
4162
- int res1 = 0 ;
4163
- VALUE vresult = Qnil;
4164
-
4165
- if ((argc < 0) || (argc > 0)) {
4166
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4167
- }
4168
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4169
- if (!SWIG_IsOK(res1)) {
4170
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "password" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4171
- }
4172
- arg1 = (struct st_mysql_options *)(argp1);
4173
- result = (char *) ((arg1)->password);
4174
- vresult = SWIG_FromCharPtr((const char *)result);
4175
- return vresult;
4176
- fail:
4177
- return Qnil;
4178
- }
4179
-
4180
-
4181
- SWIGINTERN VALUE
4182
- _wrap_st_mysql_options_unix_socket_set(int argc, VALUE *argv, VALUE self) {
4183
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4184
- char *arg2 = (char *) 0 ;
4185
- void *argp1 = 0 ;
4186
- int res1 = 0 ;
4187
- int res2 ;
4188
- char *buf2 = 0 ;
4189
- int alloc2 = 0 ;
4190
-
4191
- if ((argc < 1) || (argc > 1)) {
4192
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4193
- }
4194
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4195
- if (!SWIG_IsOK(res1)) {
4196
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "unix_socket" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4197
- }
4198
- arg1 = (struct st_mysql_options *)(argp1);
4199
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4200
- if (!SWIG_IsOK(res2)) {
4201
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "unix_socket" "', argument " "2"" of type '" "char *""'");
4202
- }
4203
- arg2 = (char *)(buf2);
4204
- if (arg1->unix_socket) free((char*)arg1->unix_socket);
4205
- if (arg2) {
4206
- size_t size = strlen((const char *)(arg2)) + 1;
4207
- arg1->unix_socket = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4208
- } else {
4209
- arg1->unix_socket = 0;
4210
- }
4211
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4212
- return Qnil;
4213
- fail:
4214
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4215
- return Qnil;
4216
- }
4217
-
4218
-
4219
- SWIGINTERN VALUE
4220
- _wrap_st_mysql_options_unix_socket_get(int argc, VALUE *argv, VALUE self) {
4221
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4222
- char *result = 0 ;
4223
- void *argp1 = 0 ;
4224
- int res1 = 0 ;
4225
- VALUE vresult = Qnil;
4226
-
4227
- if ((argc < 0) || (argc > 0)) {
4228
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4229
- }
4230
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4231
- if (!SWIG_IsOK(res1)) {
4232
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "unix_socket" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4233
- }
4234
- arg1 = (struct st_mysql_options *)(argp1);
4235
- result = (char *) ((arg1)->unix_socket);
4236
- vresult = SWIG_FromCharPtr((const char *)result);
4237
- return vresult;
4238
- fail:
4239
- return Qnil;
4240
- }
4241
-
4242
-
4243
- SWIGINTERN VALUE
4244
- _wrap_st_mysql_options_db_set(int argc, VALUE *argv, VALUE self) {
4245
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4246
- char *arg2 = (char *) 0 ;
4247
- void *argp1 = 0 ;
4248
- int res1 = 0 ;
4249
- int res2 ;
4250
- char *buf2 = 0 ;
4251
- int alloc2 = 0 ;
4252
-
4253
- if ((argc < 1) || (argc > 1)) {
4254
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4255
- }
4256
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4257
- if (!SWIG_IsOK(res1)) {
4258
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "db" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4259
- }
4260
- arg1 = (struct st_mysql_options *)(argp1);
4261
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4262
- if (!SWIG_IsOK(res2)) {
4263
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "db" "', argument " "2"" of type '" "char *""'");
4264
- }
4265
- arg2 = (char *)(buf2);
4266
- if (arg1->db) free((char*)arg1->db);
4267
- if (arg2) {
4268
- size_t size = strlen((const char *)(arg2)) + 1;
4269
- arg1->db = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4270
- } else {
4271
- arg1->db = 0;
4272
- }
4273
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4274
- return Qnil;
4275
- fail:
4276
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4277
- return Qnil;
4278
- }
4279
-
4280
-
4281
- SWIGINTERN VALUE
4282
- _wrap_st_mysql_options_db_get(int argc, VALUE *argv, VALUE self) {
4283
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4284
- char *result = 0 ;
4285
- void *argp1 = 0 ;
4286
- int res1 = 0 ;
4287
- VALUE vresult = Qnil;
4288
-
4289
- if ((argc < 0) || (argc > 0)) {
4290
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4291
- }
4292
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4293
- if (!SWIG_IsOK(res1)) {
4294
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "db" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4295
- }
4296
- arg1 = (struct st_mysql_options *)(argp1);
4297
- result = (char *) ((arg1)->db);
4298
- vresult = SWIG_FromCharPtr((const char *)result);
4299
- return vresult;
4300
- fail:
4301
- return Qnil;
4302
- }
4303
-
4304
-
4305
- SWIGINTERN VALUE
4306
- _wrap_st_mysql_options_init_commands_set(int argc, VALUE *argv, VALUE self) {
4307
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4308
- struct st_dynamic_array *arg2 = (struct st_dynamic_array *) 0 ;
4309
- void *argp1 = 0 ;
4310
- int res1 = 0 ;
4311
- void *argp2 = 0 ;
4312
- int res2 = 0 ;
4313
-
4314
- if ((argc < 1) || (argc > 1)) {
4315
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4316
- }
4317
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4318
- if (!SWIG_IsOK(res1)) {
4319
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "init_commands" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4320
- }
4321
- arg1 = (struct st_mysql_options *)(argp1);
4322
- res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_st_dynamic_array, SWIG_POINTER_DISOWN | 0 );
4323
- if (!SWIG_IsOK(res2)) {
4324
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "init_commands" "', argument " "2"" of type '" "struct st_dynamic_array *""'");
4325
- }
4326
- arg2 = (struct st_dynamic_array *)(argp2);
4327
- if (arg1) (arg1)->init_commands = arg2;
4328
-
4329
- return Qnil;
4330
- fail:
4331
- return Qnil;
4332
- }
4333
-
4334
-
4335
- SWIGINTERN VALUE
4336
- _wrap_st_mysql_options_init_commands_get(int argc, VALUE *argv, VALUE self) {
4337
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4338
- struct st_dynamic_array *result = 0 ;
4339
- void *argp1 = 0 ;
4340
- int res1 = 0 ;
4341
- VALUE vresult = Qnil;
4342
-
4343
- if ((argc < 0) || (argc > 0)) {
4344
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4345
- }
4346
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4347
- if (!SWIG_IsOK(res1)) {
4348
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "init_commands" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4349
- }
4350
- arg1 = (struct st_mysql_options *)(argp1);
4351
- result = (struct st_dynamic_array *) ((arg1)->init_commands);
4352
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_st_dynamic_array, 0 | 0 );
4353
- return vresult;
4354
- fail:
4355
- return Qnil;
4356
- }
4357
-
4358
-
4359
- SWIGINTERN VALUE
4360
- _wrap_st_mysql_options_my_cnf_file_set(int argc, VALUE *argv, VALUE self) {
4361
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4362
- char *arg2 = (char *) 0 ;
4363
- void *argp1 = 0 ;
4364
- int res1 = 0 ;
4365
- int res2 ;
4366
- char *buf2 = 0 ;
4367
- int alloc2 = 0 ;
4368
-
4369
- if ((argc < 1) || (argc > 1)) {
4370
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4371
- }
4372
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4373
- if (!SWIG_IsOK(res1)) {
4374
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "my_cnf_file" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4375
- }
4376
- arg1 = (struct st_mysql_options *)(argp1);
4377
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4378
- if (!SWIG_IsOK(res2)) {
4379
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "my_cnf_file" "', argument " "2"" of type '" "char *""'");
4380
- }
4381
- arg2 = (char *)(buf2);
4382
- if (arg1->my_cnf_file) free((char*)arg1->my_cnf_file);
4383
- if (arg2) {
4384
- size_t size = strlen((const char *)(arg2)) + 1;
4385
- arg1->my_cnf_file = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4386
- } else {
4387
- arg1->my_cnf_file = 0;
4388
- }
4389
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4390
- return Qnil;
4391
- fail:
4392
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4393
- return Qnil;
4394
- }
4395
-
4396
-
4397
- SWIGINTERN VALUE
4398
- _wrap_st_mysql_options_my_cnf_file_get(int argc, VALUE *argv, VALUE self) {
4399
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4400
- char *result = 0 ;
4401
- void *argp1 = 0 ;
4402
- int res1 = 0 ;
4403
- VALUE vresult = Qnil;
4404
-
4405
- if ((argc < 0) || (argc > 0)) {
4406
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4407
- }
4408
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4409
- if (!SWIG_IsOK(res1)) {
4410
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "my_cnf_file" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4411
- }
4412
- arg1 = (struct st_mysql_options *)(argp1);
4413
- result = (char *) ((arg1)->my_cnf_file);
4414
- vresult = SWIG_FromCharPtr((const char *)result);
4415
- return vresult;
4416
- fail:
4417
- return Qnil;
4418
- }
4419
-
4420
-
4421
- SWIGINTERN VALUE
4422
- _wrap_st_mysql_options_my_cnf_group_set(int argc, VALUE *argv, VALUE self) {
4423
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4424
- char *arg2 = (char *) 0 ;
4425
- void *argp1 = 0 ;
4426
- int res1 = 0 ;
4427
- int res2 ;
4428
- char *buf2 = 0 ;
4429
- int alloc2 = 0 ;
4430
-
4431
- if ((argc < 1) || (argc > 1)) {
4432
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4433
- }
4434
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4435
- if (!SWIG_IsOK(res1)) {
4436
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "my_cnf_group" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4437
- }
4438
- arg1 = (struct st_mysql_options *)(argp1);
4439
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4440
- if (!SWIG_IsOK(res2)) {
4441
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "my_cnf_group" "', argument " "2"" of type '" "char *""'");
4442
- }
4443
- arg2 = (char *)(buf2);
4444
- if (arg1->my_cnf_group) free((char*)arg1->my_cnf_group);
4445
- if (arg2) {
4446
- size_t size = strlen((const char *)(arg2)) + 1;
4447
- arg1->my_cnf_group = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4448
- } else {
4449
- arg1->my_cnf_group = 0;
4450
- }
4451
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4452
- return Qnil;
4453
- fail:
4454
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4455
- return Qnil;
4456
- }
4457
-
4458
-
4459
- SWIGINTERN VALUE
4460
- _wrap_st_mysql_options_my_cnf_group_get(int argc, VALUE *argv, VALUE self) {
4461
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4462
- char *result = 0 ;
4463
- void *argp1 = 0 ;
4464
- int res1 = 0 ;
4465
- VALUE vresult = Qnil;
4466
-
4467
- if ((argc < 0) || (argc > 0)) {
4468
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4469
- }
4470
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4471
- if (!SWIG_IsOK(res1)) {
4472
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "my_cnf_group" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4473
- }
4474
- arg1 = (struct st_mysql_options *)(argp1);
4475
- result = (char *) ((arg1)->my_cnf_group);
4476
- vresult = SWIG_FromCharPtr((const char *)result);
4477
- return vresult;
4478
- fail:
4479
- return Qnil;
4480
- }
4481
-
4482
-
4483
- SWIGINTERN VALUE
4484
- _wrap_st_mysql_options_charset_dir_set(int argc, VALUE *argv, VALUE self) {
4485
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4486
- char *arg2 = (char *) 0 ;
4487
- void *argp1 = 0 ;
4488
- int res1 = 0 ;
4489
- int res2 ;
4490
- char *buf2 = 0 ;
4491
- int alloc2 = 0 ;
4492
-
4493
- if ((argc < 1) || (argc > 1)) {
4494
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4495
- }
4496
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4497
- if (!SWIG_IsOK(res1)) {
4498
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charset_dir" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4499
- }
4500
- arg1 = (struct st_mysql_options *)(argp1);
4501
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4502
- if (!SWIG_IsOK(res2)) {
4503
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "charset_dir" "', argument " "2"" of type '" "char *""'");
4504
- }
4505
- arg2 = (char *)(buf2);
4506
- if (arg1->charset_dir) free((char*)arg1->charset_dir);
4507
- if (arg2) {
4508
- size_t size = strlen((const char *)(arg2)) + 1;
4509
- arg1->charset_dir = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4510
- } else {
4511
- arg1->charset_dir = 0;
4512
- }
4513
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4514
- return Qnil;
4515
- fail:
4516
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4517
- return Qnil;
4518
- }
4519
-
4520
-
4521
- SWIGINTERN VALUE
4522
- _wrap_st_mysql_options_charset_dir_get(int argc, VALUE *argv, VALUE self) {
4523
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4524
- char *result = 0 ;
4525
- void *argp1 = 0 ;
4526
- int res1 = 0 ;
4527
- VALUE vresult = Qnil;
4528
-
4529
- if ((argc < 0) || (argc > 0)) {
4530
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4531
- }
4532
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4533
- if (!SWIG_IsOK(res1)) {
4534
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charset_dir" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4535
- }
4536
- arg1 = (struct st_mysql_options *)(argp1);
4537
- result = (char *) ((arg1)->charset_dir);
4538
- vresult = SWIG_FromCharPtr((const char *)result);
4539
- return vresult;
4540
- fail:
4541
- return Qnil;
4542
- }
4543
-
4544
-
4545
- SWIGINTERN VALUE
4546
- _wrap_st_mysql_options_charset_name_set(int argc, VALUE *argv, VALUE self) {
4547
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4548
- char *arg2 = (char *) 0 ;
4549
- void *argp1 = 0 ;
4550
- int res1 = 0 ;
4551
- int res2 ;
4552
- char *buf2 = 0 ;
4553
- int alloc2 = 0 ;
4554
-
4555
- if ((argc < 1) || (argc > 1)) {
4556
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4557
- }
4558
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4559
- if (!SWIG_IsOK(res1)) {
4560
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charset_name" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4561
- }
4562
- arg1 = (struct st_mysql_options *)(argp1);
4563
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4564
- if (!SWIG_IsOK(res2)) {
4565
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "charset_name" "', argument " "2"" of type '" "char *""'");
4566
- }
4567
- arg2 = (char *)(buf2);
4568
- if (arg1->charset_name) free((char*)arg1->charset_name);
4569
- if (arg2) {
4570
- size_t size = strlen((const char *)(arg2)) + 1;
4571
- arg1->charset_name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4572
- } else {
4573
- arg1->charset_name = 0;
4574
- }
4575
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4576
- return Qnil;
4577
- fail:
4578
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4579
- return Qnil;
4580
- }
4581
-
4582
-
4583
- SWIGINTERN VALUE
4584
- _wrap_st_mysql_options_charset_name_get(int argc, VALUE *argv, VALUE self) {
4585
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4586
- char *result = 0 ;
4587
- void *argp1 = 0 ;
4588
- int res1 = 0 ;
4589
- VALUE vresult = Qnil;
4590
-
4591
- if ((argc < 0) || (argc > 0)) {
4592
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4593
- }
4594
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4595
- if (!SWIG_IsOK(res1)) {
4596
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charset_name" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4597
- }
4598
- arg1 = (struct st_mysql_options *)(argp1);
4599
- result = (char *) ((arg1)->charset_name);
4600
- vresult = SWIG_FromCharPtr((const char *)result);
4601
- return vresult;
4602
- fail:
4603
- return Qnil;
4604
- }
4605
-
4606
-
4607
- SWIGINTERN VALUE
4608
- _wrap_st_mysql_options_ssl_key_set(int argc, VALUE *argv, VALUE self) {
4609
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4610
- char *arg2 = (char *) 0 ;
4611
- void *argp1 = 0 ;
4612
- int res1 = 0 ;
4613
- int res2 ;
4614
- char *buf2 = 0 ;
4615
- int alloc2 = 0 ;
4616
-
4617
- if ((argc < 1) || (argc > 1)) {
4618
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4619
- }
4620
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4621
- if (!SWIG_IsOK(res1)) {
4622
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_key" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4623
- }
4624
- arg1 = (struct st_mysql_options *)(argp1);
4625
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4626
- if (!SWIG_IsOK(res2)) {
4627
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_key" "', argument " "2"" of type '" "char *""'");
4628
- }
4629
- arg2 = (char *)(buf2);
4630
- if (arg1->ssl_key) free((char*)arg1->ssl_key);
4631
- if (arg2) {
4632
- size_t size = strlen((const char *)(arg2)) + 1;
4633
- arg1->ssl_key = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4634
- } else {
4635
- arg1->ssl_key = 0;
4636
- }
4637
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4638
- return Qnil;
4639
- fail:
4640
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4641
- return Qnil;
4642
- }
4643
-
4644
-
4645
- SWIGINTERN VALUE
4646
- _wrap_st_mysql_options_ssl_key_get(int argc, VALUE *argv, VALUE self) {
4647
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4648
- char *result = 0 ;
4649
- void *argp1 = 0 ;
4650
- int res1 = 0 ;
4651
- VALUE vresult = Qnil;
4652
-
4653
- if ((argc < 0) || (argc > 0)) {
4654
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4655
- }
4656
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4657
- if (!SWIG_IsOK(res1)) {
4658
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_key" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4659
- }
4660
- arg1 = (struct st_mysql_options *)(argp1);
4661
- result = (char *) ((arg1)->ssl_key);
4662
- vresult = SWIG_FromCharPtr((const char *)result);
4663
- return vresult;
4664
- fail:
4665
- return Qnil;
4666
- }
4667
-
4668
-
4669
- SWIGINTERN VALUE
4670
- _wrap_st_mysql_options_ssl_cert_set(int argc, VALUE *argv, VALUE self) {
4671
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4672
- char *arg2 = (char *) 0 ;
4673
- void *argp1 = 0 ;
4674
- int res1 = 0 ;
4675
- int res2 ;
4676
- char *buf2 = 0 ;
4677
- int alloc2 = 0 ;
4678
-
4679
- if ((argc < 1) || (argc > 1)) {
4680
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4681
- }
4682
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4683
- if (!SWIG_IsOK(res1)) {
4684
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cert" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4685
- }
4686
- arg1 = (struct st_mysql_options *)(argp1);
4687
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4688
- if (!SWIG_IsOK(res2)) {
4689
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_cert" "', argument " "2"" of type '" "char *""'");
4690
- }
4691
- arg2 = (char *)(buf2);
4692
- if (arg1->ssl_cert) free((char*)arg1->ssl_cert);
4693
- if (arg2) {
4694
- size_t size = strlen((const char *)(arg2)) + 1;
4695
- arg1->ssl_cert = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4696
- } else {
4697
- arg1->ssl_cert = 0;
4698
- }
4699
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4700
- return Qnil;
4701
- fail:
4702
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4703
- return Qnil;
4704
- }
4705
-
4706
-
4707
- SWIGINTERN VALUE
4708
- _wrap_st_mysql_options_ssl_cert_get(int argc, VALUE *argv, VALUE self) {
4709
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4710
- char *result = 0 ;
4711
- void *argp1 = 0 ;
4712
- int res1 = 0 ;
4713
- VALUE vresult = Qnil;
4714
-
4715
- if ((argc < 0) || (argc > 0)) {
4716
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4717
- }
4718
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4719
- if (!SWIG_IsOK(res1)) {
4720
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cert" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4721
- }
4722
- arg1 = (struct st_mysql_options *)(argp1);
4723
- result = (char *) ((arg1)->ssl_cert);
4724
- vresult = SWIG_FromCharPtr((const char *)result);
4725
- return vresult;
4726
- fail:
4727
- return Qnil;
4728
- }
4729
-
4730
-
4731
- SWIGINTERN VALUE
4732
- _wrap_st_mysql_options_ssl_ca_set(int argc, VALUE *argv, VALUE self) {
4733
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4734
- char *arg2 = (char *) 0 ;
4735
- void *argp1 = 0 ;
4736
- int res1 = 0 ;
4737
- int res2 ;
4738
- char *buf2 = 0 ;
4739
- int alloc2 = 0 ;
4740
-
4741
- if ((argc < 1) || (argc > 1)) {
4742
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4743
- }
4744
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4745
- if (!SWIG_IsOK(res1)) {
4746
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ca" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4747
- }
4748
- arg1 = (struct st_mysql_options *)(argp1);
4749
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4750
- if (!SWIG_IsOK(res2)) {
4751
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_ca" "', argument " "2"" of type '" "char *""'");
4752
- }
4753
- arg2 = (char *)(buf2);
4754
- if (arg1->ssl_ca) free((char*)arg1->ssl_ca);
4755
- if (arg2) {
4756
- size_t size = strlen((const char *)(arg2)) + 1;
4757
- arg1->ssl_ca = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4758
- } else {
4759
- arg1->ssl_ca = 0;
4760
- }
4761
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4762
- return Qnil;
4763
- fail:
4764
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4765
- return Qnil;
4766
- }
4767
-
4768
-
4769
- SWIGINTERN VALUE
4770
- _wrap_st_mysql_options_ssl_ca_get(int argc, VALUE *argv, VALUE self) {
4771
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4772
- char *result = 0 ;
4773
- void *argp1 = 0 ;
4774
- int res1 = 0 ;
4775
- VALUE vresult = Qnil;
4776
-
4777
- if ((argc < 0) || (argc > 0)) {
4778
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4779
- }
4780
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4781
- if (!SWIG_IsOK(res1)) {
4782
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_ca" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4783
- }
4784
- arg1 = (struct st_mysql_options *)(argp1);
4785
- result = (char *) ((arg1)->ssl_ca);
4786
- vresult = SWIG_FromCharPtr((const char *)result);
4787
- return vresult;
4788
- fail:
4789
- return Qnil;
4790
- }
4791
-
4792
-
4793
- SWIGINTERN VALUE
4794
- _wrap_st_mysql_options_ssl_capath_set(int argc, VALUE *argv, VALUE self) {
4795
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4796
- char *arg2 = (char *) 0 ;
4797
- void *argp1 = 0 ;
4798
- int res1 = 0 ;
4799
- int res2 ;
4800
- char *buf2 = 0 ;
4801
- int alloc2 = 0 ;
4802
-
4803
- if ((argc < 1) || (argc > 1)) {
4804
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4805
- }
4806
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4807
- if (!SWIG_IsOK(res1)) {
4808
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_capath" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4809
- }
4810
- arg1 = (struct st_mysql_options *)(argp1);
4811
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4812
- if (!SWIG_IsOK(res2)) {
4813
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_capath" "', argument " "2"" of type '" "char *""'");
4814
- }
4815
- arg2 = (char *)(buf2);
4816
- if (arg1->ssl_capath) free((char*)arg1->ssl_capath);
4817
- if (arg2) {
4818
- size_t size = strlen((const char *)(arg2)) + 1;
4819
- arg1->ssl_capath = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4820
- } else {
4821
- arg1->ssl_capath = 0;
4822
- }
4823
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4824
- return Qnil;
4825
- fail:
4826
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4827
- return Qnil;
4828
- }
4829
-
4830
-
4831
- SWIGINTERN VALUE
4832
- _wrap_st_mysql_options_ssl_capath_get(int argc, VALUE *argv, VALUE self) {
4833
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4834
- char *result = 0 ;
4835
- void *argp1 = 0 ;
4836
- int res1 = 0 ;
4837
- VALUE vresult = Qnil;
4838
-
4839
- if ((argc < 0) || (argc > 0)) {
4840
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4841
- }
4842
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4843
- if (!SWIG_IsOK(res1)) {
4844
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_capath" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4845
- }
4846
- arg1 = (struct st_mysql_options *)(argp1);
4847
- result = (char *) ((arg1)->ssl_capath);
4848
- vresult = SWIG_FromCharPtr((const char *)result);
4849
- return vresult;
4850
- fail:
4851
- return Qnil;
4852
- }
4853
-
4854
-
4855
- SWIGINTERN VALUE
4856
- _wrap_st_mysql_options_ssl_cipher_set(int argc, VALUE *argv, VALUE self) {
4857
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4858
- char *arg2 = (char *) 0 ;
4859
- void *argp1 = 0 ;
4860
- int res1 = 0 ;
4861
- int res2 ;
4862
- char *buf2 = 0 ;
4863
- int alloc2 = 0 ;
4864
-
4865
- if ((argc < 1) || (argc > 1)) {
4866
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4867
- }
4868
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4869
- if (!SWIG_IsOK(res1)) {
4870
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4871
- }
4872
- arg1 = (struct st_mysql_options *)(argp1);
4873
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4874
- if (!SWIG_IsOK(res2)) {
4875
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ssl_cipher" "', argument " "2"" of type '" "char *""'");
4876
- }
4877
- arg2 = (char *)(buf2);
4878
- if (arg1->ssl_cipher) free((char*)arg1->ssl_cipher);
4879
- if (arg2) {
4880
- size_t size = strlen((const char *)(arg2)) + 1;
4881
- arg1->ssl_cipher = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4882
- } else {
4883
- arg1->ssl_cipher = 0;
4884
- }
4885
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4886
- return Qnil;
4887
- fail:
4888
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4889
- return Qnil;
4890
- }
4891
-
4892
-
4893
- SWIGINTERN VALUE
4894
- _wrap_st_mysql_options_ssl_cipher_get(int argc, VALUE *argv, VALUE self) {
4895
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4896
- char *result = 0 ;
4897
- void *argp1 = 0 ;
4898
- int res1 = 0 ;
4899
- VALUE vresult = Qnil;
4900
-
4901
- if ((argc < 0) || (argc > 0)) {
4902
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4903
- }
4904
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4905
- if (!SWIG_IsOK(res1)) {
4906
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ssl_cipher" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4907
- }
4908
- arg1 = (struct st_mysql_options *)(argp1);
4909
- result = (char *) ((arg1)->ssl_cipher);
4910
- vresult = SWIG_FromCharPtr((const char *)result);
4911
- return vresult;
4912
- fail:
4913
- return Qnil;
4914
- }
4915
-
4916
-
4917
- SWIGINTERN VALUE
4918
- _wrap_st_mysql_options_shared_memory_base_name_set(int argc, VALUE *argv, VALUE self) {
4919
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4920
- char *arg2 = (char *) 0 ;
4921
- void *argp1 = 0 ;
4922
- int res1 = 0 ;
4923
- int res2 ;
4924
- char *buf2 = 0 ;
4925
- int alloc2 = 0 ;
4926
-
4927
- if ((argc < 1) || (argc > 1)) {
4928
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4929
- }
4930
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4931
- if (!SWIG_IsOK(res1)) {
4932
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shared_memory_base_name" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4933
- }
4934
- arg1 = (struct st_mysql_options *)(argp1);
4935
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
4936
- if (!SWIG_IsOK(res2)) {
4937
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "shared_memory_base_name" "', argument " "2"" of type '" "char *""'");
4938
- }
4939
- arg2 = (char *)(buf2);
4940
- if (arg1->shared_memory_base_name) free((char*)arg1->shared_memory_base_name);
4941
- if (arg2) {
4942
- size_t size = strlen((const char *)(arg2)) + 1;
4943
- arg1->shared_memory_base_name = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
4944
- } else {
4945
- arg1->shared_memory_base_name = 0;
4946
- }
4947
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4948
- return Qnil;
4949
- fail:
4950
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4951
- return Qnil;
4952
- }
4953
-
4954
-
4955
- SWIGINTERN VALUE
4956
- _wrap_st_mysql_options_shared_memory_base_name_get(int argc, VALUE *argv, VALUE self) {
4957
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4958
- char *result = 0 ;
4959
- void *argp1 = 0 ;
4960
- int res1 = 0 ;
4961
- VALUE vresult = Qnil;
4962
-
4963
- if ((argc < 0) || (argc > 0)) {
4964
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
4965
- }
4966
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4967
- if (!SWIG_IsOK(res1)) {
4968
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "shared_memory_base_name" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4969
- }
4970
- arg1 = (struct st_mysql_options *)(argp1);
4971
- result = (char *) ((arg1)->shared_memory_base_name);
4972
- vresult = SWIG_FromCharPtr((const char *)result);
4973
- return vresult;
4974
- fail:
4975
- return Qnil;
4976
- }
4977
-
4978
-
4979
-
4980
- SWIGINTERN VALUE
4981
- _wrap_st_mysql_options_use_ssl_set(int argc, VALUE *argv, VALUE self) {
4982
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
4983
- my_bool arg2 ;
4984
- void *argp1 = 0 ;
4985
- int res1 = 0 ;
4986
- char val2 ;
4987
- int ecode2 = 0 ;
4988
-
4989
- if ((argc < 1) || (argc > 1)) {
4990
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4991
- }
4992
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
4993
- if (!SWIG_IsOK(res1)) {
4994
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "use_ssl" "', argument " "1"" of type '" "struct st_mysql_options *""'");
4995
- }
4996
- arg1 = (struct st_mysql_options *)(argp1);
4997
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
4998
- if (!SWIG_IsOK(ecode2)) {
4999
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "use_ssl" "', argument " "2"" of type '" "my_bool""'");
5000
- }
5001
- arg2 = (my_bool)(val2);
5002
- if (arg1) (arg1)->use_ssl = arg2;
5003
-
5004
- return Qnil;
5005
- fail:
5006
- return Qnil;
5007
- }
5008
-
5009
-
5010
- SWIGINTERN VALUE
5011
- _wrap_st_mysql_options_use_ssl_get(int argc, VALUE *argv, VALUE self) {
5012
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5013
- my_bool result;
5014
- void *argp1 = 0 ;
5015
- int res1 = 0 ;
5016
- VALUE vresult = Qnil;
5017
-
5018
- if ((argc < 0) || (argc > 0)) {
5019
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5020
- }
5021
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5022
- if (!SWIG_IsOK(res1)) {
5023
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "use_ssl" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5024
- }
5025
- arg1 = (struct st_mysql_options *)(argp1);
5026
- result = (my_bool) ((arg1)->use_ssl);
5027
- vresult = SWIG_From_char((char)(result));
5028
- return vresult;
5029
- fail:
5030
- return Qnil;
5031
- }
5032
-
5033
-
5034
- SWIGINTERN VALUE
5035
- _wrap_st_mysql_options_compress_set(int argc, VALUE *argv, VALUE self) {
5036
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5037
- my_bool arg2 ;
5038
- void *argp1 = 0 ;
5039
- int res1 = 0 ;
5040
- char val2 ;
5041
- int ecode2 = 0 ;
5042
-
5043
- if ((argc < 1) || (argc > 1)) {
5044
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5045
- }
5046
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5047
- if (!SWIG_IsOK(res1)) {
5048
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compress" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5049
- }
5050
- arg1 = (struct st_mysql_options *)(argp1);
5051
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5052
- if (!SWIG_IsOK(ecode2)) {
5053
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "compress" "', argument " "2"" of type '" "my_bool""'");
5054
- }
5055
- arg2 = (my_bool)(val2);
5056
- if (arg1) (arg1)->compress = arg2;
5057
-
5058
- return Qnil;
5059
- fail:
5060
- return Qnil;
5061
- }
5062
-
5063
-
5064
- SWIGINTERN VALUE
5065
- _wrap_st_mysql_options_compress_get(int argc, VALUE *argv, VALUE self) {
5066
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5067
- my_bool result;
5068
- void *argp1 = 0 ;
5069
- int res1 = 0 ;
5070
- VALUE vresult = Qnil;
5071
-
5072
- if ((argc < 0) || (argc > 0)) {
5073
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5074
- }
5075
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5076
- if (!SWIG_IsOK(res1)) {
5077
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compress" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5078
- }
5079
- arg1 = (struct st_mysql_options *)(argp1);
5080
- result = (my_bool) ((arg1)->compress);
5081
- vresult = SWIG_From_char((char)(result));
5082
- return vresult;
5083
- fail:
5084
- return Qnil;
5085
- }
5086
-
5087
-
5088
- SWIGINTERN VALUE
5089
- _wrap_st_mysql_options_named_pipe_set(int argc, VALUE *argv, VALUE self) {
5090
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5091
- my_bool arg2 ;
5092
- void *argp1 = 0 ;
5093
- int res1 = 0 ;
5094
- char val2 ;
5095
- int ecode2 = 0 ;
5096
-
5097
- if ((argc < 1) || (argc > 1)) {
5098
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5099
- }
5100
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5101
- if (!SWIG_IsOK(res1)) {
5102
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "named_pipe" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5103
- }
5104
- arg1 = (struct st_mysql_options *)(argp1);
5105
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5106
- if (!SWIG_IsOK(ecode2)) {
5107
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "named_pipe" "', argument " "2"" of type '" "my_bool""'");
5108
- }
5109
- arg2 = (my_bool)(val2);
5110
- if (arg1) (arg1)->named_pipe = arg2;
5111
-
5112
- return Qnil;
5113
- fail:
5114
- return Qnil;
5115
- }
5116
-
5117
-
5118
- SWIGINTERN VALUE
5119
- _wrap_st_mysql_options_named_pipe_get(int argc, VALUE *argv, VALUE self) {
5120
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5121
- my_bool result;
5122
- void *argp1 = 0 ;
5123
- int res1 = 0 ;
5124
- VALUE vresult = Qnil;
5125
-
5126
- if ((argc < 0) || (argc > 0)) {
5127
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5128
- }
5129
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5130
- if (!SWIG_IsOK(res1)) {
5131
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "named_pipe" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5132
- }
5133
- arg1 = (struct st_mysql_options *)(argp1);
5134
- result = (my_bool) ((arg1)->named_pipe);
5135
- vresult = SWIG_From_char((char)(result));
5136
- return vresult;
5137
- fail:
5138
- return Qnil;
5139
- }
5140
-
5141
-
5142
- SWIGINTERN VALUE
5143
- _wrap_st_mysql_options_rpl_probe_set(int argc, VALUE *argv, VALUE self) {
5144
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5145
- my_bool arg2 ;
5146
- void *argp1 = 0 ;
5147
- int res1 = 0 ;
5148
- char val2 ;
5149
- int ecode2 = 0 ;
5150
-
5151
- if ((argc < 1) || (argc > 1)) {
5152
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5153
- }
5154
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5155
- if (!SWIG_IsOK(res1)) {
5156
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rpl_probe" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5157
- }
5158
- arg1 = (struct st_mysql_options *)(argp1);
5159
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5160
- if (!SWIG_IsOK(ecode2)) {
5161
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rpl_probe" "', argument " "2"" of type '" "my_bool""'");
5162
- }
5163
- arg2 = (my_bool)(val2);
5164
- if (arg1) (arg1)->rpl_probe = arg2;
5165
-
5166
- return Qnil;
5167
- fail:
5168
- return Qnil;
5169
- }
5170
-
5171
-
5172
- SWIGINTERN VALUE
5173
- _wrap_st_mysql_options_rpl_probe_get(int argc, VALUE *argv, VALUE self) {
5174
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5175
- my_bool result;
5176
- void *argp1 = 0 ;
5177
- int res1 = 0 ;
5178
- VALUE vresult = Qnil;
5179
-
5180
- if ((argc < 0) || (argc > 0)) {
5181
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5182
- }
5183
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5184
- if (!SWIG_IsOK(res1)) {
5185
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rpl_probe" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5186
- }
5187
- arg1 = (struct st_mysql_options *)(argp1);
5188
- result = (my_bool) ((arg1)->rpl_probe);
5189
- vresult = SWIG_From_char((char)(result));
5190
- return vresult;
5191
- fail:
5192
- return Qnil;
5193
- }
5194
-
5195
-
5196
- SWIGINTERN VALUE
5197
- _wrap_st_mysql_options_rpl_parse_set(int argc, VALUE *argv, VALUE self) {
5198
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5199
- my_bool arg2 ;
5200
- void *argp1 = 0 ;
5201
- int res1 = 0 ;
5202
- char val2 ;
5203
- int ecode2 = 0 ;
5204
-
5205
- if ((argc < 1) || (argc > 1)) {
5206
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5207
- }
5208
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5209
- if (!SWIG_IsOK(res1)) {
5210
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rpl_parse" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5211
- }
5212
- arg1 = (struct st_mysql_options *)(argp1);
5213
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5214
- if (!SWIG_IsOK(ecode2)) {
5215
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rpl_parse" "', argument " "2"" of type '" "my_bool""'");
5216
- }
5217
- arg2 = (my_bool)(val2);
5218
- if (arg1) (arg1)->rpl_parse = arg2;
5219
-
5220
- return Qnil;
5221
- fail:
5222
- return Qnil;
5223
- }
5224
-
5225
-
5226
- SWIGINTERN VALUE
5227
- _wrap_st_mysql_options_rpl_parse_get(int argc, VALUE *argv, VALUE self) {
5228
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5229
- my_bool result;
5230
- void *argp1 = 0 ;
5231
- int res1 = 0 ;
5232
- VALUE vresult = Qnil;
5233
-
5234
- if ((argc < 0) || (argc > 0)) {
5235
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5236
- }
5237
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5238
- if (!SWIG_IsOK(res1)) {
5239
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rpl_parse" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5240
- }
5241
- arg1 = (struct st_mysql_options *)(argp1);
5242
- result = (my_bool) ((arg1)->rpl_parse);
5243
- vresult = SWIG_From_char((char)(result));
5244
- return vresult;
5245
- fail:
5246
- return Qnil;
5247
- }
5248
-
5249
-
5250
- SWIGINTERN VALUE
5251
- _wrap_st_mysql_options_no_master_reads_set(int argc, VALUE *argv, VALUE self) {
5252
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5253
- my_bool arg2 ;
5254
- void *argp1 = 0 ;
5255
- int res1 = 0 ;
5256
- char val2 ;
5257
- int ecode2 = 0 ;
5258
-
5259
- if ((argc < 1) || (argc > 1)) {
5260
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5261
- }
5262
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5263
- if (!SWIG_IsOK(res1)) {
5264
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "no_master_reads" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5265
- }
5266
- arg1 = (struct st_mysql_options *)(argp1);
5267
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5268
- if (!SWIG_IsOK(ecode2)) {
5269
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "no_master_reads" "', argument " "2"" of type '" "my_bool""'");
5270
- }
5271
- arg2 = (my_bool)(val2);
5272
- if (arg1) (arg1)->no_master_reads = arg2;
5273
-
5274
- return Qnil;
5275
- fail:
5276
- return Qnil;
5277
- }
5278
-
5279
-
5280
- SWIGINTERN VALUE
5281
- _wrap_st_mysql_options_no_master_reads_get(int argc, VALUE *argv, VALUE self) {
5282
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5283
- my_bool result;
5284
- void *argp1 = 0 ;
5285
- int res1 = 0 ;
5286
- VALUE vresult = Qnil;
5287
-
5288
- if ((argc < 0) || (argc > 0)) {
5289
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5290
- }
5291
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5292
- if (!SWIG_IsOK(res1)) {
5293
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "no_master_reads" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5294
- }
5295
- arg1 = (struct st_mysql_options *)(argp1);
5296
- result = (my_bool) ((arg1)->no_master_reads);
5297
- vresult = SWIG_From_char((char)(result));
5298
- return vresult;
5299
- fail:
5300
- return Qnil;
5301
- }
5302
-
5303
-
5304
- SWIGINTERN VALUE
5305
- _wrap_st_mysql_options_separate_thread_set(int argc, VALUE *argv, VALUE self) {
5306
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5307
- my_bool arg2 ;
5308
- void *argp1 = 0 ;
5309
- int res1 = 0 ;
5310
- char val2 ;
5311
- int ecode2 = 0 ;
5312
-
5313
- if ((argc < 1) || (argc > 1)) {
5314
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5315
- }
5316
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5317
- if (!SWIG_IsOK(res1)) {
5318
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "separate_thread" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5319
- }
5320
- arg1 = (struct st_mysql_options *)(argp1);
5321
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5322
- if (!SWIG_IsOK(ecode2)) {
5323
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "separate_thread" "', argument " "2"" of type '" "my_bool""'");
5324
- }
5325
- arg2 = (my_bool)(val2);
5326
- if (arg1) (arg1)->separate_thread = arg2;
5327
-
5328
- return Qnil;
5329
- fail:
5330
- return Qnil;
5331
- }
5332
-
5333
-
5334
- SWIGINTERN VALUE
5335
- _wrap_st_mysql_options_separate_thread_get(int argc, VALUE *argv, VALUE self) {
5336
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5337
- my_bool result;
5338
- void *argp1 = 0 ;
5339
- int res1 = 0 ;
5340
- VALUE vresult = Qnil;
5341
-
5342
- if ((argc < 0) || (argc > 0)) {
5343
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5344
- }
5345
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5346
- if (!SWIG_IsOK(res1)) {
5347
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "separate_thread" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5348
- }
5349
- arg1 = (struct st_mysql_options *)(argp1);
5350
- result = (my_bool) ((arg1)->separate_thread);
5351
- vresult = SWIG_From_char((char)(result));
5352
- return vresult;
5353
- fail:
5354
- return Qnil;
5355
- }
5356
-
5357
-
5358
- SWIGINTERN VALUE
5359
- _wrap_st_mysql_options_methods_to_use_set(int argc, VALUE *argv, VALUE self) {
5360
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5361
- enum mysql_option arg2 ;
5362
- void *argp1 = 0 ;
5363
- int res1 = 0 ;
5364
- int val2 ;
5365
- int ecode2 = 0 ;
5366
-
5367
- if ((argc < 1) || (argc > 1)) {
5368
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5369
- }
5370
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5371
- if (!SWIG_IsOK(res1)) {
5372
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "methods_to_use" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5373
- }
5374
- arg1 = (struct st_mysql_options *)(argp1);
5375
- ecode2 = SWIG_AsVal_int(argv[0], &val2);
5376
- if (!SWIG_IsOK(ecode2)) {
5377
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "methods_to_use" "', argument " "2"" of type '" "enum mysql_option""'");
5378
- }
5379
- arg2 = (enum mysql_option)(val2);
5380
- if (arg1) (arg1)->methods_to_use = arg2;
5381
-
5382
- return Qnil;
5383
- fail:
5384
- return Qnil;
5385
- }
5386
-
5387
-
5388
- SWIGINTERN VALUE
5389
- _wrap_st_mysql_options_methods_to_use_get(int argc, VALUE *argv, VALUE self) {
5390
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5391
- enum mysql_option result;
5392
- void *argp1 = 0 ;
5393
- int res1 = 0 ;
5394
- VALUE vresult = Qnil;
5395
-
5396
- if ((argc < 0) || (argc > 0)) {
5397
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5398
- }
5399
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5400
- if (!SWIG_IsOK(res1)) {
5401
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "methods_to_use" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5402
- }
5403
- arg1 = (struct st_mysql_options *)(argp1);
5404
- result = (enum mysql_option) ((arg1)->methods_to_use);
5405
- vresult = SWIG_From_int((int)(result));
5406
- return vresult;
5407
- fail:
5408
- return Qnil;
5409
- }
5410
-
5411
-
5412
- SWIGINTERN VALUE
5413
- _wrap_st_mysql_options_client_ip_set(int argc, VALUE *argv, VALUE self) {
5414
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5415
- char *arg2 = (char *) 0 ;
5416
- void *argp1 = 0 ;
5417
- int res1 = 0 ;
5418
- int res2 ;
5419
- char *buf2 = 0 ;
5420
- int alloc2 = 0 ;
5421
-
5422
- if ((argc < 1) || (argc > 1)) {
5423
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5424
- }
5425
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5426
- if (!SWIG_IsOK(res1)) {
5427
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "client_ip" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5428
- }
5429
- arg1 = (struct st_mysql_options *)(argp1);
5430
- res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
5431
- if (!SWIG_IsOK(res2)) {
5432
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "client_ip" "', argument " "2"" of type '" "char *""'");
5433
- }
5434
- arg2 = (char *)(buf2);
5435
- if (arg1->client_ip) free((char*)arg1->client_ip);
5436
- if (arg2) {
5437
- size_t size = strlen((const char *)(arg2)) + 1;
5438
- arg1->client_ip = (char *)(char *)memcpy((char *)malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
5439
- } else {
5440
- arg1->client_ip = 0;
5441
- }
5442
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5443
- return Qnil;
5444
- fail:
5445
- if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5446
- return Qnil;
5447
- }
5448
-
5449
-
5450
- SWIGINTERN VALUE
5451
- _wrap_st_mysql_options_client_ip_get(int argc, VALUE *argv, VALUE self) {
5452
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5453
- char *result = 0 ;
5454
- void *argp1 = 0 ;
5455
- int res1 = 0 ;
5456
- VALUE vresult = Qnil;
5457
-
5458
- if ((argc < 0) || (argc > 0)) {
5459
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5460
- }
5461
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5462
- if (!SWIG_IsOK(res1)) {
5463
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "client_ip" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5464
- }
5465
- arg1 = (struct st_mysql_options *)(argp1);
5466
- result = (char *) ((arg1)->client_ip);
5467
- vresult = SWIG_FromCharPtr((const char *)result);
5468
- return vresult;
5469
- fail:
5470
- return Qnil;
5471
- }
5472
-
5473
-
5474
- SWIGINTERN VALUE
5475
- _wrap_st_mysql_options_secure_auth_set(int argc, VALUE *argv, VALUE self) {
5476
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5477
- my_bool arg2 ;
5478
- void *argp1 = 0 ;
5479
- int res1 = 0 ;
5480
- char val2 ;
5481
- int ecode2 = 0 ;
5482
-
5483
- if ((argc < 1) || (argc > 1)) {
5484
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5485
- }
5486
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5487
- if (!SWIG_IsOK(res1)) {
5488
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "secure_auth" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5489
- }
5490
- arg1 = (struct st_mysql_options *)(argp1);
5491
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5492
- if (!SWIG_IsOK(ecode2)) {
5493
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "secure_auth" "', argument " "2"" of type '" "my_bool""'");
5494
- }
5495
- arg2 = (my_bool)(val2);
5496
- if (arg1) (arg1)->secure_auth = arg2;
5497
-
5498
- return Qnil;
5499
- fail:
5500
- return Qnil;
5501
- }
5502
-
5503
-
5504
- SWIGINTERN VALUE
5505
- _wrap_st_mysql_options_secure_auth_get(int argc, VALUE *argv, VALUE self) {
5506
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5507
- my_bool result;
5508
- void *argp1 = 0 ;
5509
- int res1 = 0 ;
5510
- VALUE vresult = Qnil;
5511
-
5512
- if ((argc < 0) || (argc > 0)) {
5513
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5514
- }
5515
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5516
- if (!SWIG_IsOK(res1)) {
5517
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "secure_auth" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5518
- }
5519
- arg1 = (struct st_mysql_options *)(argp1);
5520
- result = (my_bool) ((arg1)->secure_auth);
5521
- vresult = SWIG_From_char((char)(result));
5522
- return vresult;
5523
- fail:
5524
- return Qnil;
5525
- }
5526
-
5527
-
5528
- SWIGINTERN VALUE
5529
- _wrap_st_mysql_options_report_data_truncation_set(int argc, VALUE *argv, VALUE self) {
5530
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5531
- my_bool arg2 ;
5532
- void *argp1 = 0 ;
5533
- int res1 = 0 ;
5534
- char val2 ;
5535
- int ecode2 = 0 ;
5536
-
5537
- if ((argc < 1) || (argc > 1)) {
5538
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5539
- }
5540
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5541
- if (!SWIG_IsOK(res1)) {
5542
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "report_data_truncation" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5543
- }
5544
- arg1 = (struct st_mysql_options *)(argp1);
5545
- ecode2 = SWIG_AsVal_char(argv[0], &val2);
5546
- if (!SWIG_IsOK(ecode2)) {
5547
- SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "report_data_truncation" "', argument " "2"" of type '" "my_bool""'");
5548
- }
5549
- arg2 = (my_bool)(val2);
5550
- if (arg1) (arg1)->report_data_truncation = arg2;
5551
-
5552
- return Qnil;
5553
- fail:
5554
- return Qnil;
5555
- }
5556
-
5557
-
3348
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
5558
3349
  SWIGINTERN VALUE
5559
- _wrap_st_mysql_options_report_data_truncation_get(int argc, VALUE *argv, VALUE self) {
5560
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5561
- my_bool result;
5562
- void *argp1 = 0 ;
5563
- int res1 = 0 ;
5564
- VALUE vresult = Qnil;
3350
+ _wrap_MYSQL_ROWS_allocate(VALUE self) {
3351
+ #else
3352
+ SWIGINTERN VALUE
3353
+ _wrap_MYSQL_ROWS_allocate(int argc, VALUE *argv, VALUE self) {
3354
+ #endif
3355
+
3356
+
3357
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_st_mysql_rows);
3358
+ #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
3359
+ rb_obj_call_init(vresult, argc, argv);
3360
+ #endif
3361
+ return vresult;
3362
+ }
3363
+
3364
+
3365
+ SWIGINTERN VALUE
3366
+ _wrap_new_MYSQL_ROWS(int argc, VALUE *argv, VALUE self) {
3367
+ MYSQL_ROWS *result = 0 ;
5565
3368
 
5566
3369
  if ((argc < 0) || (argc > 0)) {
5567
3370
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5568
3371
  }
5569
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
5570
- if (!SWIG_IsOK(res1)) {
5571
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "report_data_truncation" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5572
- }
5573
- arg1 = (struct st_mysql_options *)(argp1);
5574
- result = (my_bool) ((arg1)->report_data_truncation);
5575
- vresult = SWIG_From_char((char)(result));
5576
- return vresult;
3372
+ result = (MYSQL_ROWS *)(MYSQL_ROWS *) calloc(1, sizeof(MYSQL_ROWS));DATA_PTR(self) = result;
3373
+
3374
+ return self;
5577
3375
  fail:
5578
3376
  return Qnil;
5579
3377
  }
5580
3378
 
5581
3379
 
3380
+ SWIGINTERN void
3381
+ free_MYSQL_ROWS(MYSQL_ROWS *arg1) {
3382
+ free((char *) arg1);
3383
+ }
3384
+
3385
+ swig_class cMYSQL_DATA;
3386
+
5582
3387
  SWIGINTERN VALUE
5583
- _wrap_st_mysql_options_local_infile_init_set(int argc, VALUE *argv, VALUE self) {
5584
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5585
- int (*arg2)(void **,char const *,void *) = (int (*)(void **,char const *,void *)) 0 ;
3388
+ _wrap_MYSQL_DATA_rows_set(int argc, VALUE *argv, VALUE self) {
3389
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3390
+ my_ulonglong arg2 ;
5586
3391
  void *argp1 = 0 ;
5587
3392
  int res1 = 0 ;
3393
+ unsigned long long val2 ;
3394
+ int ecode2 = 0 ;
5588
3395
 
5589
3396
  if ((argc < 1) || (argc > 1)) {
5590
3397
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5591
3398
  }
5592
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3399
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5593
3400
  if (!SWIG_IsOK(res1)) {
5594
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_init" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5595
- }
5596
- arg1 = (struct st_mysql_options *)(argp1);
5597
- {
5598
- int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_p_void_p_q_const__char_p_void__int);
5599
- if (!SWIG_IsOK(res)) {
5600
- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "local_infile_init" "', argument " "2"" of type '" "int (*)(void **,char const *,void *)""'");
5601
- }
3401
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rows" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5602
3402
  }
5603
- if (arg1) (arg1)->local_infile_init = arg2;
3403
+ arg1 = (MYSQL_DATA *)(argp1);
3404
+ ecode2 = SWIG_AsVal_unsigned_SS_long_SS_long(argv[0], &val2);
3405
+ if (!SWIG_IsOK(ecode2)) {
3406
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rows" "', argument " "2"" of type '" "my_ulonglong""'");
3407
+ }
3408
+ arg2 = (my_ulonglong)(val2);
3409
+ if (arg1) (arg1)->rows = arg2;
5604
3410
 
5605
3411
  return Qnil;
5606
3412
  fail:
@@ -5609,9 +3415,9 @@ fail:
5609
3415
 
5610
3416
 
5611
3417
  SWIGINTERN VALUE
5612
- _wrap_st_mysql_options_local_infile_init_get(int argc, VALUE *argv, VALUE self) {
5613
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5614
- int (*result)(void **,char const *,void *) = 0 ;
3418
+ _wrap_MYSQL_DATA_rows_get(int argc, VALUE *argv, VALUE self) {
3419
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3420
+ my_ulonglong result;
5615
3421
  void *argp1 = 0 ;
5616
3422
  int res1 = 0 ;
5617
3423
  VALUE vresult = Qnil;
@@ -5619,13 +3425,13 @@ _wrap_st_mysql_options_local_infile_init_get(int argc, VALUE *argv, VALUE self)
5619
3425
  if ((argc < 0) || (argc > 0)) {
5620
3426
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5621
3427
  }
5622
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3428
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5623
3429
  if (!SWIG_IsOK(res1)) {
5624
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_init" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3430
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rows" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5625
3431
  }
5626
- arg1 = (struct st_mysql_options *)(argp1);
5627
- result = (int (*)(void **,char const *,void *)) ((arg1)->local_infile_init);
5628
- vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_p_void_p_q_const__char_p_void__int);
3432
+ arg1 = (MYSQL_DATA *)(argp1);
3433
+ result = (my_ulonglong) ((arg1)->rows);
3434
+ vresult = SWIG_From_unsigned_SS_long_SS_long((unsigned long long)(result));
5629
3435
  return vresult;
5630
3436
  fail:
5631
3437
  return Qnil;
@@ -5633,27 +3439,28 @@ fail:
5633
3439
 
5634
3440
 
5635
3441
  SWIGINTERN VALUE
5636
- _wrap_st_mysql_options_local_infile_read_set(int argc, VALUE *argv, VALUE self) {
5637
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5638
- int (*arg2)(void *,char *,unsigned int) = (int (*)(void *,char *,unsigned int)) 0 ;
3442
+ _wrap_MYSQL_DATA_fields_set(int argc, VALUE *argv, VALUE self) {
3443
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3444
+ unsigned int arg2 ;
5639
3445
  void *argp1 = 0 ;
5640
3446
  int res1 = 0 ;
3447
+ unsigned int val2 ;
3448
+ int ecode2 = 0 ;
5641
3449
 
5642
3450
  if ((argc < 1) || (argc > 1)) {
5643
3451
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5644
3452
  }
5645
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3453
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5646
3454
  if (!SWIG_IsOK(res1)) {
5647
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_read" "', argument " "1"" of type '" "struct st_mysql_options *""'");
5648
- }
5649
- arg1 = (struct st_mysql_options *)(argp1);
5650
- {
5651
- int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_char_unsigned_int__int);
5652
- if (!SWIG_IsOK(res)) {
5653
- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "local_infile_read" "', argument " "2"" of type '" "int (*)(void *,char *,unsigned int)""'");
5654
- }
3455
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5655
3456
  }
5656
- if (arg1) (arg1)->local_infile_read = arg2;
3457
+ arg1 = (MYSQL_DATA *)(argp1);
3458
+ ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2);
3459
+ if (!SWIG_IsOK(ecode2)) {
3460
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields" "', argument " "2"" of type '" "unsigned int""'");
3461
+ }
3462
+ arg2 = (unsigned int)(val2);
3463
+ if (arg1) (arg1)->fields = arg2;
5657
3464
 
5658
3465
  return Qnil;
5659
3466
  fail:
@@ -5662,9 +3469,9 @@ fail:
5662
3469
 
5663
3470
 
5664
3471
  SWIGINTERN VALUE
5665
- _wrap_st_mysql_options_local_infile_read_get(int argc, VALUE *argv, VALUE self) {
5666
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5667
- int (*result)(void *,char *,unsigned int) = 0 ;
3472
+ _wrap_MYSQL_DATA_fields_get(int argc, VALUE *argv, VALUE self) {
3473
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3474
+ unsigned int result;
5668
3475
  void *argp1 = 0 ;
5669
3476
  int res1 = 0 ;
5670
3477
  VALUE vresult = Qnil;
@@ -5672,13 +3479,13 @@ _wrap_st_mysql_options_local_infile_read_get(int argc, VALUE *argv, VALUE self)
5672
3479
  if ((argc < 0) || (argc > 0)) {
5673
3480
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5674
3481
  }
5675
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3482
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5676
3483
  if (!SWIG_IsOK(res1)) {
5677
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_read" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3484
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5678
3485
  }
5679
- arg1 = (struct st_mysql_options *)(argp1);
5680
- result = (int (*)(void *,char *,unsigned int)) ((arg1)->local_infile_read);
5681
- vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_char_unsigned_int__int);
3486
+ arg1 = (MYSQL_DATA *)(argp1);
3487
+ result = (unsigned int) ((arg1)->fields);
3488
+ vresult = SWIG_From_unsigned_SS_int((unsigned int)(result));
5682
3489
  return vresult;
5683
3490
  fail:
5684
3491
  return Qnil;
@@ -5686,27 +3493,28 @@ fail:
5686
3493
 
5687
3494
 
5688
3495
  SWIGINTERN VALUE
5689
- _wrap_st_mysql_options_local_infile_end_set(int argc, VALUE *argv, VALUE self) {
5690
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5691
- void (*arg2)(void *) = (void (*)(void *)) 0 ;
3496
+ _wrap_MYSQL_DATA_data_set(int argc, VALUE *argv, VALUE self) {
3497
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3498
+ MYSQL_ROWS *arg2 = (MYSQL_ROWS *) 0 ;
5692
3499
  void *argp1 = 0 ;
5693
3500
  int res1 = 0 ;
3501
+ void *argp2 = 0 ;
3502
+ int res2 = 0 ;
5694
3503
 
5695
3504
  if ((argc < 1) || (argc > 1)) {
5696
3505
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5697
3506
  }
5698
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3507
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5699
3508
  if (!SWIG_IsOK(res1)) {
5700
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_end" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3509
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5701
3510
  }
5702
- arg1 = (struct st_mysql_options *)(argp1);
5703
- {
5704
- int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void__void);
5705
- if (!SWIG_IsOK(res)) {
5706
- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "local_infile_end" "', argument " "2"" of type '" "void (*)(void *)""'");
5707
- }
3511
+ arg1 = (MYSQL_DATA *)(argp1);
3512
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_st_mysql_rows, SWIG_POINTER_DISOWN | 0 );
3513
+ if (!SWIG_IsOK(res2)) {
3514
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "data" "', argument " "2"" of type '" "MYSQL_ROWS *""'");
5708
3515
  }
5709
- if (arg1) (arg1)->local_infile_end = arg2;
3516
+ arg2 = (MYSQL_ROWS *)(argp2);
3517
+ if (arg1) (arg1)->data = arg2;
5710
3518
 
5711
3519
  return Qnil;
5712
3520
  fail:
@@ -5715,9 +3523,9 @@ fail:
5715
3523
 
5716
3524
 
5717
3525
  SWIGINTERN VALUE
5718
- _wrap_st_mysql_options_local_infile_end_get(int argc, VALUE *argv, VALUE self) {
5719
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5720
- void (*result)(void *) = 0 ;
3526
+ _wrap_MYSQL_DATA_data_get(int argc, VALUE *argv, VALUE self) {
3527
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3528
+ MYSQL_ROWS *result = 0 ;
5721
3529
  void *argp1 = 0 ;
5722
3530
  int res1 = 0 ;
5723
3531
  VALUE vresult = Qnil;
@@ -5725,13 +3533,13 @@ _wrap_st_mysql_options_local_infile_end_get(int argc, VALUE *argv, VALUE self) {
5725
3533
  if ((argc < 0) || (argc > 0)) {
5726
3534
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5727
3535
  }
5728
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3536
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5729
3537
  if (!SWIG_IsOK(res1)) {
5730
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_end" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3538
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "data" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5731
3539
  }
5732
- arg1 = (struct st_mysql_options *)(argp1);
5733
- result = (void (*)(void *)) ((arg1)->local_infile_end);
5734
- vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void__void);
3540
+ arg1 = (MYSQL_DATA *)(argp1);
3541
+ result = (MYSQL_ROWS *) ((arg1)->data);
3542
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_st_mysql_rows, 0 | 0 );
5735
3543
  return vresult;
5736
3544
  fail:
5737
3545
  return Qnil;
@@ -5739,27 +3547,34 @@ fail:
5739
3547
 
5740
3548
 
5741
3549
  SWIGINTERN VALUE
5742
- _wrap_st_mysql_options_local_infile_error_set(int argc, VALUE *argv, VALUE self) {
5743
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5744
- int (*arg2)(void *,char *,unsigned int) = (int (*)(void *,char *,unsigned int)) 0 ;
3550
+ _wrap_MYSQL_DATA_alloc_set(int argc, VALUE *argv, VALUE self) {
3551
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3552
+ MEM_ROOT arg2 ;
5745
3553
  void *argp1 = 0 ;
5746
3554
  int res1 = 0 ;
3555
+ void *argp2 ;
3556
+ int res2 = 0 ;
5747
3557
 
5748
3558
  if ((argc < 1) || (argc > 1)) {
5749
3559
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5750
3560
  }
5751
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3561
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5752
3562
  if (!SWIG_IsOK(res1)) {
5753
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_error" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3563
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "alloc" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5754
3564
  }
5755
- arg1 = (struct st_mysql_options *)(argp1);
3565
+ arg1 = (MYSQL_DATA *)(argp1);
5756
3566
  {
5757
- int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_char_unsigned_int__int);
5758
- if (!SWIG_IsOK(res)) {
5759
- SWIG_exception_fail(SWIG_ArgError(res), "in method '" "local_infile_error" "', argument " "2"" of type '" "int (*)(void *,char *,unsigned int)""'");
3567
+ res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_MEM_ROOT, 0 );
3568
+ if (!SWIG_IsOK(res2)) {
3569
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "alloc" "', argument " "2"" of type '" "MEM_ROOT""'");
3570
+ }
3571
+ if (!argp2) {
3572
+ SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "alloc" "', argument " "2"" of type '" "MEM_ROOT""'");
3573
+ } else {
3574
+ arg2 = *((MEM_ROOT *)(argp2));
5760
3575
  }
5761
3576
  }
5762
- if (arg1) (arg1)->local_infile_error = arg2;
3577
+ if (arg1) (arg1)->alloc = arg2;
5763
3578
 
5764
3579
  return Qnil;
5765
3580
  fail:
@@ -5768,9 +3583,9 @@ fail:
5768
3583
 
5769
3584
 
5770
3585
  SWIGINTERN VALUE
5771
- _wrap_st_mysql_options_local_infile_error_get(int argc, VALUE *argv, VALUE self) {
5772
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5773
- int (*result)(void *,char *,unsigned int) = 0 ;
3586
+ _wrap_MYSQL_DATA_alloc_get(int argc, VALUE *argv, VALUE self) {
3587
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3588
+ MEM_ROOT result;
5774
3589
  void *argp1 = 0 ;
5775
3590
  int res1 = 0 ;
5776
3591
  VALUE vresult = Qnil;
@@ -5778,13 +3593,13 @@ _wrap_st_mysql_options_local_infile_error_get(int argc, VALUE *argv, VALUE self)
5778
3593
  if ((argc < 0) || (argc > 0)) {
5779
3594
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5780
3595
  }
5781
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3596
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5782
3597
  if (!SWIG_IsOK(res1)) {
5783
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_error" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3598
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "alloc" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5784
3599
  }
5785
- arg1 = (struct st_mysql_options *)(argp1);
5786
- result = (int (*)(void *,char *,unsigned int)) ((arg1)->local_infile_error);
5787
- vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_void_p_char_unsigned_int__int);
3600
+ arg1 = (MYSQL_DATA *)(argp1);
3601
+ result = ((arg1)->alloc);
3602
+ vresult = SWIG_NewPointerObj((MEM_ROOT *)memcpy((MEM_ROOT *)malloc(sizeof(MEM_ROOT)),&result,sizeof(MEM_ROOT)), SWIGTYPE_p_MEM_ROOT, SWIG_POINTER_OWN | 0 );
5788
3603
  return vresult;
5789
3604
  fail:
5790
3605
  return Qnil;
@@ -5792,26 +3607,28 @@ fail:
5792
3607
 
5793
3608
 
5794
3609
  SWIGINTERN VALUE
5795
- _wrap_st_mysql_options_local_infile_userdata_set(int argc, VALUE *argv, VALUE self) {
5796
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5797
- void *arg2 = (void *) 0 ;
3610
+ _wrap_MYSQL_DATA_embedded_info_set(int argc, VALUE *argv, VALUE self) {
3611
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3612
+ struct embedded_query_result *arg2 = (struct embedded_query_result *) 0 ;
5798
3613
  void *argp1 = 0 ;
5799
3614
  int res1 = 0 ;
5800
- int res2 ;
3615
+ void *argp2 = 0 ;
3616
+ int res2 = 0 ;
5801
3617
 
5802
3618
  if ((argc < 1) || (argc > 1)) {
5803
3619
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
5804
3620
  }
5805
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3621
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5806
3622
  if (!SWIG_IsOK(res1)) {
5807
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_userdata" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3623
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "embedded_info" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5808
3624
  }
5809
- arg1 = (struct st_mysql_options *)(argp1);
5810
- res2 = SWIG_ConvertPtr(argv[0],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
3625
+ arg1 = (MYSQL_DATA *)(argp1);
3626
+ res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_embedded_query_result, SWIG_POINTER_DISOWN | 0 );
5811
3627
  if (!SWIG_IsOK(res2)) {
5812
- SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "local_infile_userdata" "', argument " "2"" of type '" "void *""'");
3628
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "embedded_info" "', argument " "2"" of type '" "struct embedded_query_result *""'");
5813
3629
  }
5814
- if (arg1) (arg1)->local_infile_userdata = arg2;
3630
+ arg2 = (struct embedded_query_result *)(argp2);
3631
+ if (arg1) (arg1)->embedded_info = arg2;
5815
3632
 
5816
3633
  return Qnil;
5817
3634
  fail:
@@ -5820,9 +3637,9 @@ fail:
5820
3637
 
5821
3638
 
5822
3639
  SWIGINTERN VALUE
5823
- _wrap_st_mysql_options_local_infile_userdata_get(int argc, VALUE *argv, VALUE self) {
5824
- struct st_mysql_options *arg1 = (struct st_mysql_options *) 0 ;
5825
- void *result = 0 ;
3640
+ _wrap_MYSQL_DATA_embedded_info_get(int argc, VALUE *argv, VALUE self) {
3641
+ MYSQL_DATA *arg1 = (MYSQL_DATA *) 0 ;
3642
+ struct embedded_query_result *result = 0 ;
5826
3643
  void *argp1 = 0 ;
5827
3644
  int res1 = 0 ;
5828
3645
  VALUE vresult = Qnil;
@@ -5830,13 +3647,13 @@ _wrap_st_mysql_options_local_infile_userdata_get(int argc, VALUE *argv, VALUE se
5830
3647
  if ((argc < 0) || (argc > 0)) {
5831
3648
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5832
3649
  }
5833
- res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_options, 0 | 0 );
3650
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_st_mysql_data, 0 | 0 );
5834
3651
  if (!SWIG_IsOK(res1)) {
5835
- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "local_infile_userdata" "', argument " "1"" of type '" "struct st_mysql_options *""'");
3652
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "embedded_info" "', argument " "1"" of type '" "MYSQL_DATA *""'");
5836
3653
  }
5837
- arg1 = (struct st_mysql_options *)(argp1);
5838
- result = (void *) ((arg1)->local_infile_userdata);
5839
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
3654
+ arg1 = (MYSQL_DATA *)(argp1);
3655
+ result = (struct embedded_query_result *) ((arg1)->embedded_info);
3656
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_embedded_query_result, 0 | 0 );
5840
3657
  return vresult;
5841
3658
  fail:
5842
3659
  return Qnil;
@@ -5845,14 +3662,14 @@ fail:
5845
3662
 
5846
3663
  #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
5847
3664
  SWIGINTERN VALUE
5848
- _wrap_st_mysql_options_allocate(VALUE self) {
3665
+ _wrap_MYSQL_DATA_allocate(VALUE self) {
5849
3666
  #else
5850
3667
  SWIGINTERN VALUE
5851
- _wrap_st_mysql_options_allocate(int argc, VALUE *argv, VALUE self) {
3668
+ _wrap_MYSQL_DATA_allocate(int argc, VALUE *argv, VALUE self) {
5852
3669
  #endif
5853
3670
 
5854
3671
 
5855
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_st_mysql_options);
3672
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_st_mysql_data);
5856
3673
  #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
5857
3674
  rb_obj_call_init(vresult, argc, argv);
5858
3675
  #endif
@@ -5861,13 +3678,13 @@ _wrap_st_mysql_options_allocate(VALUE self) {
5861
3678
 
5862
3679
 
5863
3680
  SWIGINTERN VALUE
5864
- _wrap_new_st_mysql_options(int argc, VALUE *argv, VALUE self) {
5865
- struct st_mysql_options *result = 0 ;
3681
+ _wrap_new_MYSQL_DATA(int argc, VALUE *argv, VALUE self) {
3682
+ MYSQL_DATA *result = 0 ;
5866
3683
 
5867
3684
  if ((argc < 0) || (argc > 0)) {
5868
3685
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
5869
3686
  }
5870
- result = (struct st_mysql_options *)(struct st_mysql_options *) calloc(1, sizeof(struct st_mysql_options));DATA_PTR(self) = result;
3687
+ result = (MYSQL_DATA *)(MYSQL_DATA *) calloc(1, sizeof(MYSQL_DATA));DATA_PTR(self) = result;
5871
3688
 
5872
3689
  return self;
5873
3690
  fail:
@@ -5876,7 +3693,7 @@ fail:
5876
3693
 
5877
3694
 
5878
3695
  SWIGINTERN void
5879
- free_st_mysql_options(struct st_mysql_options *arg1) {
3696
+ free_MYSQL_DATA(MYSQL_DATA *arg1) {
5880
3697
  free((char *) arg1);
5881
3698
  }
5882
3699
 
@@ -10683,7 +8500,7 @@ _wrap_mysql_fetch_fields(int argc, VALUE *argv, VALUE self) {
10683
8500
  MYSQL_FIELD *result = 0 ;
10684
8501
  void *argp1 = 0 ;
10685
8502
  int res1 = 0 ;
10686
- int i = 0;
8503
+ VALUE vresult = Qnil;
10687
8504
 
10688
8505
  if ((argc < 1) || (argc > 1)) {
10689
8506
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -10694,16 +8511,8 @@ _wrap_mysql_fetch_fields(int argc, VALUE *argv, VALUE self) {
10694
8511
  }
10695
8512
  arg1 = (MYSQL_RES *)(argp1);
10696
8513
  result = (MYSQL_FIELD *)mysql_fetch_fields(arg1);
10697
- int num_fields = mysql_num_fields(arg1);
10698
- VALUE ary = rb_ary_new();
10699
- for(i=0; i < num_fields; i++) {
10700
- if((result + i) == NULL) rb_ary_push(ary, Qnil);
10701
- else rb_ary_push(ary, SWIG_NewPointerObj(SWIG_as_voidptr(result + i), SWIGTYPE_p_st_mysql_field, 0 | 0));
10702
- }
10703
- return ary;
10704
-
10705
- // vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_st_mysql_field, 0 | 0 );
10706
- // return vresult;
8514
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_st_mysql_field, 0 | 0 );
8515
+ return vresult;
10707
8516
  fail:
10708
8517
  return Qnil;
10709
8518
  }
@@ -12698,7 +10507,7 @@ _wrap_mysql_fetch_row(int argc, VALUE *argv, VALUE self) {
12698
10507
  MYSQL_ROW result;
12699
10508
  void *argp1 = 0 ;
12700
10509
  int res1 = 0 ;
12701
- int i = 0;
10510
+ VALUE vresult = Qnil;
12702
10511
 
12703
10512
  if ((argc < 1) || (argc > 1)) {
12704
10513
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
@@ -12709,17 +10518,8 @@ _wrap_mysql_fetch_row(int argc, VALUE *argv, VALUE self) {
12709
10518
  }
12710
10519
  arg1 = (MYSQL_RES *)(argp1);
12711
10520
  result = (MYSQL_ROW)mysql_fetch_row(arg1);
12712
- if(result == NULL) SWIG_fail;
12713
- VALUE ary = rb_ary_new();
12714
- int rows = mysql_num_fields(arg1);
12715
- for(i=0; i < rows; i++) {
12716
- if(result[i] == NULL) rb_ary_push(ary, Qnil);
12717
- else rb_ary_push(ary, rb_str_new2(result[i]));
12718
- }
12719
- return ary;
12720
-
12721
- // vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 );
12722
- // return vresult;
10521
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 );
10522
+ return vresult;
12723
10523
  fail:
12724
10524
  return Qnil;
12725
10525
  }
@@ -17647,6 +15447,94 @@ fail:
17647
15447
  }
17648
15448
 
17649
15449
 
15450
+ SWIGINTERN VALUE
15451
+ _wrap_mysql_c_fetch_field_names(int argc, VALUE *argv, VALUE self) {
15452
+ MYSQL_RES *arg1 = (MYSQL_RES *) 0 ;
15453
+ int arg2 ;
15454
+ VALUE result;
15455
+ void *argp1 = 0 ;
15456
+ int res1 = 0 ;
15457
+ int val2 ;
15458
+ int ecode2 = 0 ;
15459
+ VALUE vresult = Qnil;
15460
+
15461
+ if ((argc < 2) || (argc > 2)) {
15462
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15463
+ }
15464
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_st_mysql_res, 0 | 0 );
15465
+ if (!SWIG_IsOK(res1)) {
15466
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mysql_c_fetch_field_names" "', argument " "1"" of type '" "MYSQL_RES *""'");
15467
+ }
15468
+ arg1 = (MYSQL_RES *)(argp1);
15469
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
15470
+ if (!SWIG_IsOK(ecode2)) {
15471
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mysql_c_fetch_field_names" "', argument " "2"" of type '" "int""'");
15472
+ }
15473
+ arg2 = (int)(val2);
15474
+ result = (VALUE)mysql_c_fetch_field_names(arg1,arg2);
15475
+ vresult = result;
15476
+ return vresult;
15477
+ fail:
15478
+ return Qnil;
15479
+ }
15480
+
15481
+
15482
+ SWIGINTERN VALUE
15483
+ _wrap_mysql_c_fetch_field_types(int argc, VALUE *argv, VALUE self) {
15484
+ MYSQL_RES *arg1 = (MYSQL_RES *) 0 ;
15485
+ int arg2 ;
15486
+ VALUE result;
15487
+ void *argp1 = 0 ;
15488
+ int res1 = 0 ;
15489
+ int val2 ;
15490
+ int ecode2 = 0 ;
15491
+ VALUE vresult = Qnil;
15492
+
15493
+ if ((argc < 2) || (argc > 2)) {
15494
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
15495
+ }
15496
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_st_mysql_res, 0 | 0 );
15497
+ if (!SWIG_IsOK(res1)) {
15498
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mysql_c_fetch_field_types" "', argument " "1"" of type '" "MYSQL_RES *""'");
15499
+ }
15500
+ arg1 = (MYSQL_RES *)(argp1);
15501
+ ecode2 = SWIG_AsVal_int(argv[1], &val2);
15502
+ if (!SWIG_IsOK(ecode2)) {
15503
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mysql_c_fetch_field_types" "', argument " "2"" of type '" "int""'");
15504
+ }
15505
+ arg2 = (int)(val2);
15506
+ result = (VALUE)mysql_c_fetch_field_types(arg1,arg2);
15507
+ vresult = result;
15508
+ return vresult;
15509
+ fail:
15510
+ return Qnil;
15511
+ }
15512
+
15513
+
15514
+ SWIGINTERN VALUE
15515
+ _wrap_mysql_c_fetch_row(int argc, VALUE *argv, VALUE self) {
15516
+ MYSQL_RES *arg1 = (MYSQL_RES *) 0 ;
15517
+ VALUE result;
15518
+ void *argp1 = 0 ;
15519
+ int res1 = 0 ;
15520
+ VALUE vresult = Qnil;
15521
+
15522
+ if ((argc < 1) || (argc > 1)) {
15523
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
15524
+ }
15525
+ res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_st_mysql_res, 0 | 0 );
15526
+ if (!SWIG_IsOK(res1)) {
15527
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mysql_c_fetch_row" "', argument " "1"" of type '" "MYSQL_RES *""'");
15528
+ }
15529
+ arg1 = (MYSQL_RES *)(argp1);
15530
+ result = (VALUE)mysql_c_fetch_row(arg1);
15531
+ vresult = result;
15532
+ return vresult;
15533
+ fail:
15534
+ return Qnil;
15535
+ }
15536
+
15537
+
17650
15538
 
17651
15539
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
17652
15540
 
@@ -17678,7 +15566,6 @@ static swig_type_info _swigt__p_f_p_void_p_char_p_unsigned_long__p_char = {"_p_f
17678
15566
  static swig_type_info _swigt__p_f_p_void_p_char_unsigned_int__int = {"_p_f_p_void_p_char_unsigned_int__int", "int (*)(void *,char *,unsigned int)", 0, 0, (void*)0, 0};
17679
15567
  static swig_type_info _swigt__p_int = {"_p_int", "int *|my_socket *", 0, 0, (void*)0, 0};
17680
15568
  static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **|MYSQL_ROW", 0, 0, (void*)0, 0};
17681
- static swig_type_info _swigt__p_st_dynamic_array = {"_p_st_dynamic_array", "struct st_dynamic_array *", 0, 0, (void*)0, 0};
17682
15569
  static swig_type_info _swigt__p_st_mysql = {"_p_st_mysql", "struct st_mysql *|MYSQL *", 0, 0, (void*)0, 0};
17683
15570
  static swig_type_info _swigt__p_st_mysql_bind = {"_p_st_mysql_bind", "struct st_mysql_bind *|MYSQL_BIND *", 0, 0, (void*)0, 0};
17684
15571
  static swig_type_info _swigt__p_st_mysql_data = {"_p_st_mysql_data", "struct st_mysql_data *|MYSQL_DATA *", 0, 0, (void*)0, 0};
@@ -17725,7 +15612,6 @@ static swig_type_info *swig_type_initial[] = {
17725
15612
  &_swigt__p_f_p_void_p_char_unsigned_int__int,
17726
15613
  &_swigt__p_int,
17727
15614
  &_swigt__p_p_char,
17728
- &_swigt__p_st_dynamic_array,
17729
15615
  &_swigt__p_st_mysql,
17730
15616
  &_swigt__p_st_mysql_bind,
17731
15617
  &_swigt__p_st_mysql_data,
@@ -17772,7 +15658,6 @@ static swig_cast_info _swigc__p_f_p_void_p_char_p_unsigned_long__p_char[] = { {
17772
15658
  static swig_cast_info _swigc__p_f_p_void_p_char_unsigned_int__int[] = { {&_swigt__p_f_p_void_p_char_unsigned_int__int, 0, 0, 0},{0, 0, 0, 0}};
17773
15659
  static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
17774
15660
  static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
17775
- static swig_cast_info _swigc__p_st_dynamic_array[] = { {&_swigt__p_st_dynamic_array, 0, 0, 0},{0, 0, 0, 0}};
17776
15661
  static swig_cast_info _swigc__p_st_mysql[] = { {&_swigt__p_st_mysql, 0, 0, 0},{0, 0, 0, 0}};
17777
15662
  static swig_cast_info _swigc__p_st_mysql_bind[] = { {&_swigt__p_st_mysql_bind, 0, 0, 0},{0, 0, 0, 0}};
17778
15663
  static swig_cast_info _swigc__p_st_mysql_data[] = { {&_swigt__p_st_mysql_data, 0, 0, 0},{0, 0, 0, 0}};
@@ -17819,7 +15704,6 @@ static swig_cast_info *swig_cast_initial[] = {
17819
15704
  _swigc__p_f_p_void_p_char_unsigned_int__int,
17820
15705
  _swigc__p_int,
17821
15706
  _swigc__p_p_char,
17822
- _swigc__p_st_dynamic_array,
17823
15707
  _swigc__p_st_mysql,
17824
15708
  _swigc__p_st_mysql_bind,
17825
15709
  _swigc__p_st_mysql_data,
@@ -18193,90 +16077,6 @@ SWIGEXPORT void Init_mysql_c(void) {
18193
16077
  rb_define_const(mMysql_c, "MYSQL_REPORT_DATA_TRUNCATION", SWIG_From_int((int)(MYSQL_REPORT_DATA_TRUNCATION)));
18194
16078
  rb_define_const(mMysql_c, "MYSQL_OPT_RECONNECT", SWIG_From_int((int)(MYSQL_OPT_RECONNECT)));
18195
16079
  rb_define_const(mMysql_c, "MYSQL_OPT_SSL_VERIFY_SERVER_CERT", SWIG_From_int((int)(MYSQL_OPT_SSL_VERIFY_SERVER_CERT)));
18196
-
18197
- cSt_mysql_options.klass = rb_define_class_under(mMysql_c, "St_mysql_options", rb_cObject);
18198
- SWIG_TypeClientData(SWIGTYPE_p_st_mysql_options, (void *) &cSt_mysql_options);
18199
- rb_define_alloc_func(cSt_mysql_options.klass, _wrap_st_mysql_options_allocate);
18200
- rb_define_method(cSt_mysql_options.klass, "initialize", _wrap_new_st_mysql_options, -1);
18201
- rb_define_method(cSt_mysql_options.klass, "connect_timeout=", _wrap_st_mysql_options_connect_timeout_set, -1);
18202
- rb_define_method(cSt_mysql_options.klass, "connect_timeout", _wrap_st_mysql_options_connect_timeout_get, -1);
18203
- rb_define_method(cSt_mysql_options.klass, "read_timeout=", _wrap_st_mysql_options_read_timeout_set, -1);
18204
- rb_define_method(cSt_mysql_options.klass, "read_timeout", _wrap_st_mysql_options_read_timeout_get, -1);
18205
- rb_define_method(cSt_mysql_options.klass, "write_timeout=", _wrap_st_mysql_options_write_timeout_set, -1);
18206
- rb_define_method(cSt_mysql_options.klass, "write_timeout", _wrap_st_mysql_options_write_timeout_get, -1);
18207
- rb_define_method(cSt_mysql_options.klass, "port=", _wrap_st_mysql_options_port_set, -1);
18208
- rb_define_method(cSt_mysql_options.klass, "port", _wrap_st_mysql_options_port_get, -1);
18209
- rb_define_method(cSt_mysql_options.klass, "protocol=", _wrap_st_mysql_options_protocol_set, -1);
18210
- rb_define_method(cSt_mysql_options.klass, "protocol", _wrap_st_mysql_options_protocol_get, -1);
18211
- rb_define_method(cSt_mysql_options.klass, "client_flag=", _wrap_st_mysql_options_client_flag_set, -1);
18212
- rb_define_method(cSt_mysql_options.klass, "client_flag", _wrap_st_mysql_options_client_flag_get, -1);
18213
- rb_define_method(cSt_mysql_options.klass, "host=", _wrap_st_mysql_options_host_set, -1);
18214
- rb_define_method(cSt_mysql_options.klass, "host", _wrap_st_mysql_options_host_get, -1);
18215
- rb_define_method(cSt_mysql_options.klass, "user=", _wrap_st_mysql_options_user_set, -1);
18216
- rb_define_method(cSt_mysql_options.klass, "user", _wrap_st_mysql_options_user_get, -1);
18217
- rb_define_method(cSt_mysql_options.klass, "password=", _wrap_st_mysql_options_password_set, -1);
18218
- rb_define_method(cSt_mysql_options.klass, "password", _wrap_st_mysql_options_password_get, -1);
18219
- rb_define_method(cSt_mysql_options.klass, "unix_socket=", _wrap_st_mysql_options_unix_socket_set, -1);
18220
- rb_define_method(cSt_mysql_options.klass, "unix_socket", _wrap_st_mysql_options_unix_socket_get, -1);
18221
- rb_define_method(cSt_mysql_options.klass, "db=", _wrap_st_mysql_options_db_set, -1);
18222
- rb_define_method(cSt_mysql_options.klass, "db", _wrap_st_mysql_options_db_get, -1);
18223
- rb_define_method(cSt_mysql_options.klass, "init_commands=", _wrap_st_mysql_options_init_commands_set, -1);
18224
- rb_define_method(cSt_mysql_options.klass, "init_commands", _wrap_st_mysql_options_init_commands_get, -1);
18225
- rb_define_method(cSt_mysql_options.klass, "my_cnf_file=", _wrap_st_mysql_options_my_cnf_file_set, -1);
18226
- rb_define_method(cSt_mysql_options.klass, "my_cnf_file", _wrap_st_mysql_options_my_cnf_file_get, -1);
18227
- rb_define_method(cSt_mysql_options.klass, "my_cnf_group=", _wrap_st_mysql_options_my_cnf_group_set, -1);
18228
- rb_define_method(cSt_mysql_options.klass, "my_cnf_group", _wrap_st_mysql_options_my_cnf_group_get, -1);
18229
- rb_define_method(cSt_mysql_options.klass, "charset_dir=", _wrap_st_mysql_options_charset_dir_set, -1);
18230
- rb_define_method(cSt_mysql_options.klass, "charset_dir", _wrap_st_mysql_options_charset_dir_get, -1);
18231
- rb_define_method(cSt_mysql_options.klass, "charset_name=", _wrap_st_mysql_options_charset_name_set, -1);
18232
- rb_define_method(cSt_mysql_options.klass, "charset_name", _wrap_st_mysql_options_charset_name_get, -1);
18233
- rb_define_method(cSt_mysql_options.klass, "ssl_key=", _wrap_st_mysql_options_ssl_key_set, -1);
18234
- rb_define_method(cSt_mysql_options.klass, "ssl_key", _wrap_st_mysql_options_ssl_key_get, -1);
18235
- rb_define_method(cSt_mysql_options.klass, "ssl_cert=", _wrap_st_mysql_options_ssl_cert_set, -1);
18236
- rb_define_method(cSt_mysql_options.klass, "ssl_cert", _wrap_st_mysql_options_ssl_cert_get, -1);
18237
- rb_define_method(cSt_mysql_options.klass, "ssl_ca=", _wrap_st_mysql_options_ssl_ca_set, -1);
18238
- rb_define_method(cSt_mysql_options.klass, "ssl_ca", _wrap_st_mysql_options_ssl_ca_get, -1);
18239
- rb_define_method(cSt_mysql_options.klass, "ssl_capath=", _wrap_st_mysql_options_ssl_capath_set, -1);
18240
- rb_define_method(cSt_mysql_options.klass, "ssl_capath", _wrap_st_mysql_options_ssl_capath_get, -1);
18241
- rb_define_method(cSt_mysql_options.klass, "ssl_cipher=", _wrap_st_mysql_options_ssl_cipher_set, -1);
18242
- rb_define_method(cSt_mysql_options.klass, "ssl_cipher", _wrap_st_mysql_options_ssl_cipher_get, -1);
18243
- rb_define_method(cSt_mysql_options.klass, "shared_memory_base_name=", _wrap_st_mysql_options_shared_memory_base_name_set, -1);
18244
- rb_define_method(cSt_mysql_options.klass, "shared_memory_base_name", _wrap_st_mysql_options_shared_memory_base_name_get, -1);
18245
- rb_define_method(cSt_mysql_options.klass, "use_ssl=", _wrap_st_mysql_options_use_ssl_set, -1);
18246
- rb_define_method(cSt_mysql_options.klass, "use_ssl", _wrap_st_mysql_options_use_ssl_get, -1);
18247
- rb_define_method(cSt_mysql_options.klass, "compress=", _wrap_st_mysql_options_compress_set, -1);
18248
- rb_define_method(cSt_mysql_options.klass, "compress", _wrap_st_mysql_options_compress_get, -1);
18249
- rb_define_method(cSt_mysql_options.klass, "named_pipe=", _wrap_st_mysql_options_named_pipe_set, -1);
18250
- rb_define_method(cSt_mysql_options.klass, "named_pipe", _wrap_st_mysql_options_named_pipe_get, -1);
18251
- rb_define_method(cSt_mysql_options.klass, "rpl_probe=", _wrap_st_mysql_options_rpl_probe_set, -1);
18252
- rb_define_method(cSt_mysql_options.klass, "rpl_probe", _wrap_st_mysql_options_rpl_probe_get, -1);
18253
- rb_define_method(cSt_mysql_options.klass, "rpl_parse=", _wrap_st_mysql_options_rpl_parse_set, -1);
18254
- rb_define_method(cSt_mysql_options.klass, "rpl_parse", _wrap_st_mysql_options_rpl_parse_get, -1);
18255
- rb_define_method(cSt_mysql_options.klass, "no_master_reads=", _wrap_st_mysql_options_no_master_reads_set, -1);
18256
- rb_define_method(cSt_mysql_options.klass, "no_master_reads", _wrap_st_mysql_options_no_master_reads_get, -1);
18257
- rb_define_method(cSt_mysql_options.klass, "separate_thread=", _wrap_st_mysql_options_separate_thread_set, -1);
18258
- rb_define_method(cSt_mysql_options.klass, "separate_thread", _wrap_st_mysql_options_separate_thread_get, -1);
18259
- rb_define_method(cSt_mysql_options.klass, "methods_to_use=", _wrap_st_mysql_options_methods_to_use_set, -1);
18260
- rb_define_method(cSt_mysql_options.klass, "methods_to_use", _wrap_st_mysql_options_methods_to_use_get, -1);
18261
- rb_define_method(cSt_mysql_options.klass, "client_ip=", _wrap_st_mysql_options_client_ip_set, -1);
18262
- rb_define_method(cSt_mysql_options.klass, "client_ip", _wrap_st_mysql_options_client_ip_get, -1);
18263
- rb_define_method(cSt_mysql_options.klass, "secure_auth=", _wrap_st_mysql_options_secure_auth_set, -1);
18264
- rb_define_method(cSt_mysql_options.klass, "secure_auth", _wrap_st_mysql_options_secure_auth_get, -1);
18265
- rb_define_method(cSt_mysql_options.klass, "report_data_truncation=", _wrap_st_mysql_options_report_data_truncation_set, -1);
18266
- rb_define_method(cSt_mysql_options.klass, "report_data_truncation", _wrap_st_mysql_options_report_data_truncation_get, -1);
18267
- rb_define_method(cSt_mysql_options.klass, "local_infile_init=", _wrap_st_mysql_options_local_infile_init_set, -1);
18268
- rb_define_method(cSt_mysql_options.klass, "local_infile_init", _wrap_st_mysql_options_local_infile_init_get, -1);
18269
- rb_define_method(cSt_mysql_options.klass, "local_infile_read=", _wrap_st_mysql_options_local_infile_read_set, -1);
18270
- rb_define_method(cSt_mysql_options.klass, "local_infile_read", _wrap_st_mysql_options_local_infile_read_get, -1);
18271
- rb_define_method(cSt_mysql_options.klass, "local_infile_end=", _wrap_st_mysql_options_local_infile_end_set, -1);
18272
- rb_define_method(cSt_mysql_options.klass, "local_infile_end", _wrap_st_mysql_options_local_infile_end_get, -1);
18273
- rb_define_method(cSt_mysql_options.klass, "local_infile_error=", _wrap_st_mysql_options_local_infile_error_set, -1);
18274
- rb_define_method(cSt_mysql_options.klass, "local_infile_error", _wrap_st_mysql_options_local_infile_error_get, -1);
18275
- rb_define_method(cSt_mysql_options.klass, "local_infile_userdata=", _wrap_st_mysql_options_local_infile_userdata_set, -1);
18276
- rb_define_method(cSt_mysql_options.klass, "local_infile_userdata", _wrap_st_mysql_options_local_infile_userdata_get, -1);
18277
- cSt_mysql_options.mark = 0;
18278
- cSt_mysql_options.destroy = (void (*)(void *)) free_st_mysql_options;
18279
- cSt_mysql_options.trackObjects = 0;
18280
16080
  rb_define_const(mMysql_c, "MYSQL_STATUS_READY", SWIG_From_int((int)(MYSQL_STATUS_READY)));
18281
16081
  rb_define_const(mMysql_c, "MYSQL_STATUS_GET_RESULT", SWIG_From_int((int)(MYSQL_STATUS_GET_RESULT)));
18282
16082
  rb_define_const(mMysql_c, "MYSQL_STATUS_USE_RESULT", SWIG_From_int((int)(MYSQL_STATUS_USE_RESULT)));
@@ -18768,6 +16568,9 @@ SWIGEXPORT void Init_mysql_c(void) {
18768
16568
  rb_define_module_function(mMysql_c, "mysql_close", _wrap_mysql_close, -1);
18769
16569
  rb_define_const(mMysql_c, "MYSQL_NO_DATA", SWIG_From_int((int)(100)));
18770
16570
  rb_define_const(mMysql_c, "MYSQL_DATA_TRUNCATED", SWIG_From_int((int)(101)));
16571
+ rb_define_module_function(mMysql_c, "mysql_c_fetch_field_names", _wrap_mysql_c_fetch_field_names, -1);
16572
+ rb_define_module_function(mMysql_c, "mysql_c_fetch_field_types", _wrap_mysql_c_fetch_field_types, -1);
16573
+ rb_define_module_function(mMysql_c, "mysql_c_fetch_row", _wrap_mysql_c_fetch_row, -1);
18771
16574
  rb_define_const(mMysql_c, "MYSQL_TYPE_DECIMAL", SWIG_From_int((int)(MYSQL_TYPE_DECIMAL)));
18772
16575
  rb_define_const(mMysql_c, "MYSQL_TYPE_TINY", SWIG_From_int((int)(MYSQL_TYPE_TINY)));
18773
16576
  rb_define_const(mMysql_c, "MYSQL_TYPE_SHORT", SWIG_From_int((int)(MYSQL_TYPE_SHORT)));
@@ -18795,6 +16598,5 @@ SWIGEXPORT void Init_mysql_c(void) {
18795
16598
  rb_define_const(mMysql_c, "MYSQL_TYPE_VAR_STRING", SWIG_From_int((int)(MYSQL_TYPE_VAR_STRING)));
18796
16599
  rb_define_const(mMysql_c, "MYSQL_TYPE_STRING", SWIG_From_int((int)(MYSQL_TYPE_STRING)));
18797
16600
  rb_define_const(mMysql_c, "MYSQL_TYPE_GEOMETRY", SWIG_From_int((int)(MYSQL_TYPE_GEOMETRY)));
18798
-
18799
16601
  }
18800
16602