#0 /home/dan/repos/mariadb-connector-c/libmariadb/ma_decimal.c:444: error: Dead Store(DEAD_STORE) The value written to `&buf` is never used. 442. } 443. *buf= (x ^ mask) * powers10[DIG_PER_DEC1 - frac0x]; 444. buf++; ^ 445. } 446. return error; #1 /home/dan/repos/mariadb-connector-c/libmariadb/ma_default.c:302: error: Dead Store(DEAD_STORE) The value written to `&key` is never used. 300. *ptr=0; 301. set_option(mysql, key, optval); 302. key= optval= 0; ^ 303. } 304. } #2 /home/dan/repos/mariadb-connector-c/libmariadb/ma_dtoa.c:646: error: Null Dereference(NULLPTR_DEREFERENCE) `rv` could be null (null value originating from line 644) and is dereferenced. 644. rv= (Bigint*) malloc(len); 645. 646. rv->k= k; ^ 647. rv->maxwds= x; 648. } #3 /home/dan/repos/mariadb-connector-c/libmariadb/ma_io.c:126: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.options.extension` is read without initialization during the call to `mysql_client_find_plugin()`. 124. MYSQL mysql; 125. if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) 126. mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) ^ 127. return rio_plugin->methods->mopen(location, mode); 128. return NULL; #4 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_async.c:86: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `sock` is read without initialization. 84. polls ready for write, indicating that the connection attempt completed. 85. */ 86. res= connect(sock, name, namelen); ^ 87. if (res != 0) 88. { #5 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_dyncol.c:2325: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2323. { 2324. DYN_HEADER header; 2325. enum enum_dyncol_func_result rc= ER_DYNCOL_FORMAT; ^ 2326. memset(&header, 0, sizeof(header)); 2327. #6 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_dyncol.c:3742: error: Dead Store(DEAD_STORE) The value written to `&prev_num` is never used. 3740. } 3741. } 3742. prev_num= num; ^ 3743. prev_name= name; 3744. prev_data_offset= data_offset; #7 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_dyncol.c:4146: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `hdr.offset` is read without initialization during the call to `hdr_interval_length()`. 4144. goto err; 4145. header.length= 4146. hdr_interval_length(&header, header.entry + header.entry_size); ^ 4147. header.data= header.dtpool + header.offset; 4148. /* #8 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_dyncol.c:4285: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `hdr.offset` is read without initialization during the call to `hdr_interval_length()`. 4283. { 4284. header.length= 4285. hdr_interval_length(&header, header.entry + header.entry_size); ^ 4286. header.data= header.dtpool + header.offset; 4287. /* #9 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:784: error: Null Dereference(NULLPTR_DEREFERENCE) `options->init_command` could be null (null value originating from line 783) and is dereferenced in the call to `ma_init_dynamic_array()`. 782. { 783. options->init_command= (DYNAMIC_ARRAY*)malloc(sizeof(DYNAMIC_ARRAY)); 784. ma_init_dynamic_array(options->init_command, sizeof(char*), 5, 5); ^ 785. } 786. #10 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:787: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc` on line 780 is not freed after the last access at line 787, column 7. 785. } 786. 787. if (ma_insert_dynamic(options->init_command, (gptr)&insert)) ^ 788. free(insert); 789. } #11 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:1042: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1042) is dereferenced. 1040. ***************************************************************************/ 1041. 1042. static size_t rset_field_offsets[]= { ^ 1043. OFFSET(MYSQL_FIELD, catalog), 1044. OFFSET(MYSQL_FIELD, catalog_length), #12 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:1078: error: Null Dereference(NULLPTR_DEREFERENCE) `last_length` could be null (null value originating from line 1063) and is dereferenced. 1076. /* NULL_LENGTH (see also CONC-709) */ 1077. rc= 1; 1078. *last_length= 0; ^ 1079. } 1080. last_length= lengths++; #13 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:1144: error: Dead Store(DEAD_STORE) The value written to `&p` is never used. 1142. 1143. /* filler */ 1144. p+= 2; ^ 1145. 1146. if (INTERNAL_NUM_FIELD(field)) #14 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:2110: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.extension` is read without initialization during the call to `mysql_close()`. 2108. SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); 2109. tmp_mysql.free_me= 0; 2110. mysql_close(&tmp_mysql); ^ 2111. return(1); 2112. } #15 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:2568: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `str` is read without initialization. 2566. goto mem_error; 2567. 2568. str->str= tmp; ^ 2569. memcpy(str->str, data1->str, data1->length); 2570. str->length= data1->length; #16 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:2568: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `tmp` is read without initialization. 2566. goto mem_error; 2567. 2568. str->str= tmp; ^ 2569. memcpy(str->str, data1->str, data1->length); 2570. str->length= data1->length; #17 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3528: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3528) and is dereferenced. 3526. break; 3527. case MYSQL_SERVER_PUBLIC_KEY: 3528. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, server_public_key, (char *)arg1); ^ 3529. break; 3530. case MYSQL_PLUGIN_DIR: #18 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3531: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3531) and is dereferenced. 3529. break; 3530. case MYSQL_PLUGIN_DIR: 3531. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, plugin_dir, (char *)arg1); ^ 3532. break; 3533. case MYSQL_DEFAULT_AUTH: #19 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3534: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3534) and is dereferenced. 3532. break; 3533. case MYSQL_DEFAULT_AUTH: 3534. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, default_auth, (char *)arg1); ^ 3535. break; 3536. case MYSQL_OPT_NONBLOCK: #20 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3569: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `my_context_init()` on line 3560 is not freed after the last access at line 3569, column 9. 3567. calloc(1, sizeof(struct st_mysql_options_extension)))) 3568. { 3569. free(ctxt); ^ 3570. SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); 3571. goto end; #21 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3594: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3594) and is dereferenced. 3592. break; 3593. case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: 3594. OPT_SET_EXTENDED_VALUE(&mysql->options, tls_verify_server_cert, *(my_bool *)arg1); ^ 3595. break; 3596. case MYSQL_OPT_SSL_KEY: #22 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3612: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3612) and is dereferenced. 3610. break; 3611. case MYSQL_OPT_SSL_CRL: 3612. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, ssl_crl, (char *)arg1); ^ 3613. break; 3614. case MYSQL_OPT_SSL_CRLPATH: #23 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3615: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3615) and is dereferenced. 3613. break; 3614. case MYSQL_OPT_SSL_CRLPATH: 3615. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, ssl_crlpath, (char *)arg1); ^ 3616. break; 3617. case MYSQL_OPT_CONNECT_ATTR_DELETE: #24 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3621: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3620) and is dereferenced. 3619. uchar *h; 3620. CHECK_OPT_EXTENSION_SET(&mysql->options); 3621. if (ma_hashtbl_inited(&mysql->options.extension->connect_attrs) && ^ 3622. (h= (uchar *)ma_hashtbl_search(&mysql->options.extension->connect_attrs, (uchar *)arg1, 3623. arg1 ? (uint)strlen((char *)arg1) : 0))) #25 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3638: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3637) and is dereferenced. 3636. case MYSQL_OPT_CONNECT_ATTR_RESET: 3637. CHECK_OPT_EXTENSION_SET(&mysql->options); 3638. if (ma_hashtbl_inited(&mysql->options.extension->connect_attrs)) ^ 3639. { 3640. ma_hashtbl_free(&mysql->options.extension->connect_attrs); #26 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3645: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3645) and is dereferenced. 3643. break; 3644. case MARIADB_OPT_CONNECTION_HANDLER: 3645. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, connection_handler, (char *)arg1); ^ 3646. break; 3647. case MARIADB_OPT_PORT: #27 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3692: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3691) and is dereferenced. 3690. 3691. CHECK_OPT_EXTENSION_SET(&mysql->options); 3692. if (!ma_hashtbl_inited(&mysql->options.extension->userdata)) ^ 3693. { 3694. if (_ma_hashtbl_init(&mysql->options.extension->userdata, #28 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3753: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3751) and is dereferenced. 3751. CHECK_OPT_EXTENSION_SET(&mysql->options); 3752. if (!key_len || 3753. storage_len + mysql->options.extension->connect_attrs_len > 0xFFFF) ^ 3754. { 3755. SET_CLIENT_ERROR(mysql, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); #29 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3800: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3800) and is dereferenced. 3798. break; 3799. case MARIADB_OPT_TLS_CIPHER_STRENGTH: 3800. OPT_SET_EXTENDED_VALUE_INT(&mysql->options, tls_cipher_strength, *((unsigned int *)arg1)); ^ 3801. break; 3802. case MARIADB_OPT_SSL_FP: #30 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3804: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3804) and is dereferenced. 3802. case MARIADB_OPT_SSL_FP: 3803. case MARIADB_OPT_TLS_PEER_FP: 3804. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, tls_fp, (char *)arg1); ^ 3805. mysql->options.use_ssl= 1; 3806. break; #31 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3809: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3809) and is dereferenced. 3807. case MARIADB_OPT_SSL_FP_LIST: 3808. case MARIADB_OPT_TLS_PEER_FP_LIST: 3809. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, tls_fp_list, (char *)arg1); ^ 3810. mysql->options.use_ssl= 1; 3811. break; #32 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3813: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3813) and is dereferenced. 3811. break; 3812. case MARIADB_OPT_TLS_PASSPHRASE: 3813. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, tls_pw, (char *)arg1); ^ 3814. break; 3815. case MARIADB_OPT_CONNECTION_READ_ONLY: #33 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3816: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3816) and is dereferenced. 3814. break; 3815. case MARIADB_OPT_CONNECTION_READ_ONLY: 3816. OPT_SET_EXTENDED_VALUE_INT(&mysql->options, read_only, *(my_bool *)arg1); ^ 3817. break; 3818. case MARIADB_OPT_PROXY_HEADER: #34 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3821: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3821) and is dereferenced. 3819. { 3820. size_t arg2 = va_arg(ap, size_t); 3821. OPT_SET_EXTENDED_VALUE_BIN(&mysql->options, proxy_header, proxy_header_len, (char *)arg1, arg2); ^ 3822. } 3823. break; #35 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3826: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3826) and is dereferenced. 3824. case MARIADB_OPT_TLS_VERSION: 3825. case MYSQL_OPT_TLS_VERSION: 3826. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, tls_version, (char *)arg1); ^ 3827. break; 3828. case MARIADB_OPT_IO_WAIT: #36 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3830: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3829) and is dereferenced. 3828. case MARIADB_OPT_IO_WAIT: 3829. CHECK_OPT_EXTENSION_SET(&mysql->options); 3830. mysql->options.extension->io_wait = (int(*)(my_socket, my_bool, int))arg1; ^ 3831. break; 3832. case MARIADB_OPT_SKIP_READ_RESPONSE: #37 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3833: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3833) and is dereferenced. 3831. break; 3832. case MARIADB_OPT_SKIP_READ_RESPONSE: 3833. OPT_SET_EXTENDED_VALUE_INT(&mysql->options, skip_read_response, *(my_bool *)arg1); ^ 3834. break; 3835. case MARIADB_OPT_RESTRICTED_AUTH: #38 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3836: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3836) and is dereferenced. 3834. break; 3835. case MARIADB_OPT_RESTRICTED_AUTH: 3836. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, restricted_auth, (char *)arg1); ^ 3837. break; 3838. case MARIADB_OPT_RPL_REGISTER_REPLICA: #39 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3841: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3841) and is dereferenced. 3839. { 3840. unsigned int arg2 = va_arg(ap, unsigned int); 3841. OPT_SET_EXTENDED_VALUE_STR(&mysql->options, rpl_host,(char *)arg1); ^ 3842. OPT_SET_EXTENDED_VALUE(&mysql->options, rpl_port, (ushort)arg2); 3843. } #40 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3851: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3851) and is dereferenced. 3849. { 3850. if (arg1) { 3851. OPT_SET_EXTENDED_VALUE(&mysql->options, status_callback, arg1); ^ 3852. } 3853. if (arg2) { #41 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3854: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3854) and is dereferenced. 3852. } 3853. if (arg2) { 3854. OPT_SET_EXTENDED_VALUE(&mysql->options, status_data, arg2); ^ 3855. } 3856. } else { #42 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3857: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3857) and is dereferenced. 3855. } 3856. } else { 3857. OPT_SET_EXTENDED_VALUE(&mysql->options, status_callback, ma_save_session_track_info); ^ 3858. OPT_SET_EXTENDED_VALUE(&mysql->options, status_data, mysql); 3859. } #43 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_lib.c:3863: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql->options.extension` could be null (null value originating from line 3863) and is dereferenced. 3861. break; 3862. case MYSQL_OPT_ZSTD_COMPRESSION_LEVEL: 3863. OPT_SET_EXTENDED_VALUE(&mysql->options, zstd_compression_level, *((unsigned char *)arg1)); ^ 3864. break; 3865. default: #44 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1065: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc` on line 1010 is not freed after the last access at line 1065, column 11. 1063. char *p= buf; 1064. 1065. if (ma_feof(rpl->fp)) ^ 1066. { 1067. return NULL; #45 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1178: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1176. ev+= 1; 1177. rpl_event->event.heartbeat.flags= uint2korr(ev); 1178. ev+= 2; ^ 1179. 1180. break; #46 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1195: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1193. /* terminating zero */ 1194. RPL_CHECK_POS(ev, ev_end, 1); 1195. ev++; ^ 1196. break; 1197. #47 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1206: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1204. memcpy(rpl_event->event.start_encryption.nonce, ev, 12); 1205. memcpy(rpl->nonce, ev, 12); 1206. ev+= 12; ^ 1207. rpl->encrypted= 1; 1208. break; #48 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1250: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1248. RPL_CHECK_POS(ev, ev_end, len); 1249. rpl_set_string_and_len(&rpl_event->event.execute_load_query.statement, ev, len); 1250. ev+= len; ^ 1251. break; 1252. } #49 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1264: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1262. if (ma_set_rpl_filename(rpl, ev, len)) 1263. goto mem_error; 1264. ev+= len; ^ 1265. break; 1266. #50 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1315: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1313. { 1314. rpl_event->checksum= uint4korr(ev); 1315. ev+= 4; ^ 1316. } 1317. break; #51 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1454: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1452. ev+= 8; 1453. rpl_event->event.rand.second_seed= uint8korr(ev); 1454. ev+= 8; ^ 1455. 1456. break; #52 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1464: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1462. ev++; 1463. rpl_event->event.intvar.value= uint8korr(ev); 1464. ev+= 8; ^ 1465. break; 1466. #53 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1530: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1528. if ((unsigned long)(ev - rpl_event->raw_data) < rpl_event->raw_data_size) 1529. rpl_event->event.uservar.flags= *ev; 1530. ev++; ^ 1531. } 1532. break; #54 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1565: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1563. goto mem_error; 1564. 1565. ev+= len; ^ 1566. break; 1567. #55 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1633: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1631. rpl_event->event.previous_gtid.content.data= ev; 1632. rpl_event->event.previous_gtid.content.length= len; 1633. ev+= len; ^ 1634. } 1635. break; #56 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1655: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1653. ev+= 16; 1654. rpl_event->event.gtid_log.sequence_nr= uint8korr(ev); 1655. ev+= 8; ^ 1656. break; 1657. #57 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1687: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1685. RPL_CHECK_POS(ev, ev_end, 8); 1686. rpl_event->event.gtid.commit_id= uint8korr(ev); 1687. ev+= 8; ^ 1688. } 1689. else if (rpl_event->event.gtid.flags & (FL_PREPARED_XA | FL_COMPLETED_XA)) #58 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1702: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1700. RPL_CHECK_POS(ev, ev_end, len); 1701. rpl_set_string_and_len(&rpl_event->event.gtid.xid, ev, len); 1702. ev+= len; ^ 1703. } 1704. else #59 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1705: error: Dead Store(DEAD_STORE) The value written to `&ev` is never used. 1703. } 1704. else 1705. ev+= 6; ^ 1706. break; 1707. #60 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_rpl.c:1980: error: Null Dereference(NULLPTR_DEREFERENCE) `rpl->filename` could be null (null value originating from line 1979) and is dereferenced. 1978. { 1979. rpl->filename= (char *)malloc(rpl->filename_length); 1980. memcpy((void *)rpl->filename, arg1, rpl->filename_length); ^ 1981. } 1982. else if (arg1) #61 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_stmt.c:2282: error: Dead Store(DEAD_STORE) The value written to `&ret` is never used. 2280. { 2281. MYSQL *mysql= stmt->mysql; 2282. my_bool ret= 1; ^ 2283. unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR; 2284. unsigned int last_status; #62 /home/dan/repos/mariadb-connector-c/libmariadb/mariadb_stmt.c:2414: error: Null Dereference(NULLPTR_DEREFERENCE) `cmd_buff` could be null (null value originating from line 2413) and is dereferenced. 2412. size_t packet_len= STMT_ID_LENGTH + 2 + length; 2413. uchar *cmd_buff= (uchar *)calloc(1, packet_len); 2414. int4store(cmd_buff, stmt->stmt_id); ^ 2415. int2store(cmd_buff + STMT_ID_LENGTH, param_number); 2416. memcpy(cmd_buff + STMT_ID_LENGTH + 2, data, length); #63 /home/dan/repos/mariadb-connector-c/plugins/auth/my_auth.c:69: error: Dead Store(DEAD_STORE) The value written to `&pkt_len` is never used. 67. */ 68. pkt= (uchar*)mysql->scramble_buff; 69. pkt_len= SCRAMBLE_LENGTH + 1; ^ 70. } 71. else #64 /home/dan/repos/mariadb-connector-c/plugins/auth/my_auth.c:219: error: Dead Store(DEAD_STORE) The value written to `&end` is never used. 217. /* see end= buff+32 below, fixed size of the packet is 32 bytes */ 218. buff= malloc(33 + USERNAME_LENGTH + data_len + NAME_LEN + NAME_LEN + conn_attr_len + 9); 219. end= buff; ^ 220. 221. mysql->client_flag|= mysql->options.client_flag; #65 /home/dan/repos/mariadb-connector-c/plugins/auth/my_auth.c:308: error: Null Dereference(NULLPTR_DEREFERENCE) `buff` could be null (null value originating from line 218) and is dereferenced. 306. if (!(mysql->server_capabilities & CLIENT_MYSQL)) 307. mysql->client_flag&= ~CLIENT_MYSQL; 308. int4store(buff,mysql->client_flag); ^ 309. int4store(buff+4, net->max_packet_size); 310. buff[8]= (char) mysql->charset->nr; #66 /home/dan/repos/mariadb-connector-c/plugins/auth/my_auth.c:324: error: Null Dereference(NULLPTR_DEREFERENCE) `buff` could be null (null value originating from line 218) and is dereferenced. 322. else 323. { 324. int2store(buff, mysql->client_flag); ^ 325. int3store(buff+2, net->max_packet_size); 326. end= buff+5; #67 /home/dan/repos/mariadb-connector-c/plugins/io/remote_io.c:317: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc` on line 286 is not freed after the last access at line 317, column 5. 315. curl_easy_cleanup(rf->curl); 316. 317. free(file); ^ 318. 319. file = NULL; #68 /home/dan/repos/mariadb-connector-c/plugins/pvio/pvio_socket.c:347: error: Dead Store(DEAD_STORE) The value written to `&r` is never used. 345. ssize_t pvio_socket_async_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length) 346. { 347. ssize_t r= -1; ^ 348. #ifndef _WIN32 349. int read_flags= MSG_DONTWAIT; #69 /home/dan/repos/mariadb-connector-c/plugins/pvio/pvio_socket.c:420: error: Dead Store(DEAD_STORE) The value written to `&r` is never used. 418. ssize_t pvio_socket_async_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length) 419. { 420. ssize_t r= -1; ^ 421. struct st_pvio_socket *csock= NULL; 422. #ifndef _WIN32 #70 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:94: error: Dead Store(DEAD_STORE) The value written to `&res` is never used. 92. struct pollfd pfd; 93. int timeout; 94. int res= -1; ^ 95. 96. pfd.fd= mysql_get_socket(mysql); #71 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:150: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.options.extension` is read without initialization during the call to `mysql_options()`. 148. 149. mysql_init(&mysql); 150. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); ^ 151. check_mysql_rc(rc, (MYSQL *)&mysql); 152. #72 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:151: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 149 is not freed after the last access at line 151, column 5. 149. mysql_init(&mysql); 150. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); 151. check_mysql_rc(rc, (MYSQL *)&mysql); ^ 152. 153. /* set timeouts to 300 microseconds */ #73 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:151: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.net.last_errno` is read without initialization during the call to `mysql_errno()`. 149. mysql_init(&mysql); 150. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); 151. check_mysql_rc(rc, (MYSQL *)&mysql); ^ 152. 153. /* set timeouts to 300 microseconds */ #74 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:234: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 232 is not freed after the last access at line 234, column 3. 232. mysql= mysql_init(NULL); 233. rc= mysql_options(mysql, MYSQL_OPT_NONBLOCK, 0); 234. check_mysql_rc(rc, mysql); ^ 235. mysql_close(mysql); 236. return OK; #75 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:266: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.options.extension` is read without initialization during the call to `mysql_options()`. 264. { 265. mysql_init(&mysql); 266. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); ^ 267. check_mysql_rc(rc, (MYSQL *)&mysql); 268. #76 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:267: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 265 is not freed after the last access at line 267, column 5. 265. mysql_init(&mysql); 266. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); 267. check_mysql_rc(rc, (MYSQL *)&mysql); ^ 268. 269. /* set timeouts to 300 microseconds */ #77 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/async.c:267: error: Uninitialized Value(PULSE_UNINITIALIZED_VALUE) `mysql.net.last_errno` is read without initialization during the call to `mysql_errno()`. 265. mysql_init(&mysql); 266. rc= mysql_options(&mysql, MYSQL_OPT_NONBLOCK, 0); 267. check_mysql_rc(rc, (MYSQL *)&mysql); ^ 268. 269. /* set timeouts to 300 microseconds */ #78 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:41: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 41) and is dereferenced. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. SKIP_XPAND; 43. #79 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:41: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 41) is dereferenced. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. SKIP_XPAND; 43. #80 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:41: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 41) and is dereferenced. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. SKIP_XPAND; 43. #81 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:41: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 41) is dereferenced. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. SKIP_XPAND; 43. #82 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:66: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 64. mysql_kill(my, thread_id); 65. mysql_ping(mysql); 66. rc= mysql_query(mysql, "load data local infile './nonexistingfile.csv' into table a (`a`)"); ^ 67. FAIL_IF(!test(mysql->options.client_flag | CLIENT_LOCAL_FILES), "client_flags not correct"); 68. diag("thread1: %ld %ld", thread_id, mysql_thread_id(mysql)); #83 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:152: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 152) and is dereferenced. 150. 151. SKIP_SKYSQL; 152. SKIP_MAXSCALE; ^ 153. 154. mysql= mysql_init(NULL); #84 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:152: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 152) is dereferenced. 150. 151. SKIP_SKYSQL; 152. SKIP_MAXSCALE; ^ 153. 154. mysql= mysql_init(NULL); #85 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:152: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 152) and is dereferenced. 150. 151. SKIP_SKYSQL; 152. SKIP_MAXSCALE; ^ 153. 154. mysql= mysql_init(NULL); #86 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:152: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 152) is dereferenced. 150. 151. SKIP_SKYSQL; 152. SKIP_MAXSCALE; ^ 153. 154. mysql= mysql_init(NULL); #87 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:157: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 154 is not freed after the last access at line 157, column 3. 155. 156. rc= mysql_query(my, "SET @a:=@@max_allowed_packet"); 157. check_mysql_rc(rc, my); ^ 158. 159. mysql_query(my, "SET global max_allowed_packet=1024*1024*22"); #88 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:216: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 216) and is dereferenced. 214. SKIP_CONNECTION_HANDLER; 215. SKIP_SKYSQL; 216. SKIP_MAXSCALE; ^ 217. 218. mysql= mysql_init(NULL); #89 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:216: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 216) is dereferenced. 214. SKIP_CONNECTION_HANDLER; 215. SKIP_SKYSQL; 216. SKIP_MAXSCALE; ^ 217. 218. mysql= mysql_init(NULL); #90 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:216: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 216) and is dereferenced. 214. SKIP_CONNECTION_HANDLER; 215. SKIP_SKYSQL; 216. SKIP_MAXSCALE; ^ 217. 218. mysql= mysql_init(NULL); #91 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:216: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 216) is dereferenced. 214. SKIP_CONNECTION_HANDLER; 215. SKIP_SKYSQL; 216. SKIP_MAXSCALE; ^ 217. 218. mysql= mysql_init(NULL); #92 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:221: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 218 is not freed after the last access at line 221, column 3. 219. 220. rc= mysql_query(my, "SET @a:=@@max_allowed_packet"); 221. check_mysql_rc(rc, my); ^ 222. 223. mysql_query(my, "SET global max_allowed_packet=1024*1024*22"); #93 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:288: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 282 is not freed after the last access at line 288, column 5. 286. while ((row= mysql_fetch_row(res)) != NULL) 287. { 288. FAIL_IF(mysql_num_fields(res) != 1, "Got the wrong number of fields"); ^ 289. } 290. FAIL_IF(mysql_errno(my), mysql_error(my)); #94 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:290: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 282 is not freed after the last access at line 290, column 3. 288. FAIL_IF(mysql_num_fields(res) != 1, "Got the wrong number of fields"); 289. } 290. FAIL_IF(mysql_errno(my), mysql_error(my)); ^ 291. 292. mysql_free_result(res); #95 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:314: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 309 is not freed after the last access at line 314, column 5. 312. while ((row= mysql_fetch_row(res)) != NULL) 313. { 314. FAIL_IF(strncmp(row[0], "utf8", 4), "wrong character set"); ^ 315. } 316. FAIL_IF(mysql_errno(my), mysql_error(my)); #96 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:316: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 309 is not freed after the last access at line 316, column 3. 314. FAIL_IF(strncmp(row[0], "utf8", 4), "wrong character set"); 315. } 316. FAIL_IF(mysql_errno(my), mysql_error(my)); ^ 317. mysql_free_result(res); 318. #97 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:566: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 564. FAIL_UNLESS(res == 20, ""); 565. /* If first autogenerated number fails and 2nd works: */ 566. rc= mysql_query(mysql, "insert into t4 values (null,'e')"); ^ 567. res= mysql_insert_id(mysql); 568. FAIL_UNLESS(res == 1, ""); #98 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:697: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 696 is not freed after the last access at line 697, column 3. 695. 696. res= mysql_store_result(mysql); 697. FAIL_IF(mysql_num_rows(res) != 3, "Expected 3 rows"); ^ 698. 699. mysql_free_result(res); #99 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:712: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql` could be null (from the call to `mysql_init()` on line 709) and is dereferenced. 710. 711. mysql_options(mysql, MYSQL_DEFAULT_AUTH, "unknown"); 712. FAIL_IF(strcmp(mysql->options.extension->default_auth, "unknown"), "option not set"); ^ 713. 714. mysql_options(mysql, MYSQL_PLUGIN_DIR, "/tmp/foo"); #100 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/basic-t.c:712: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql` could be null (null value originating from line 709) and is dereferenced. 710. 711. mysql_options(mysql, MYSQL_DEFAULT_AUTH, "unknown"); 712. FAIL_IF(strcmp(mysql->options.extension->default_auth, "unknown"), "option not set"); ^ 713. 714. mysql_options(mysql, MYSQL_PLUGIN_DIR, "/tmp/foo"); #101 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:31: error: Null Dereference(NULLPTR_DEREFERENCE) `dest` could be null (null value originating from line 28) and is dereferenced. 29. char *p= dest; 30. while (length-- > 0) { 31. *dest++ = charset[rand() % sizeof(charset)]; ^ 32. } 33. *dest = '\0'; #102 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:33: error: Null Dereference(NULLPTR_DEREFERENCE) `dest` could be null (null value originating from line 28) and is dereferenced. 31. *dest++ = charset[rand() % sizeof(charset)]; 32. } 33. *dest = '\0'; ^ 34. return p; 35. } #103 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:64: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 62. return SKIP; 63. 64. rc= mysql_select_db(mysql, "testc"); ^ 65. 66. rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk1"); #104 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:231: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 230 is not freed after the last access at line 231, column 3. 229. 230. rc= mysql_stmt_bind_param(stmt, bind); 231. check_stmt_rc(rc, stmt); ^ 232. rc= mysql_stmt_execute(stmt); 233. check_stmt_rc(rc, stmt); #105 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:286: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 285 is not freed after the last access at line 286, column 3. 284. 285. rc= mysql_stmt_bind_param(stmt, bind); 286. check_stmt_rc(rc, stmt); ^ 287. rc= mysql_stmt_execute(stmt); 288. check_stmt_rc(rc, stmt); #106 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:319: error: Null Dereference(NULLPTR_DEREFERENCE) `buf` could be null (null value originating from line 311) and is dereferenced. 317. } 318. 319. buf[0]= strdup("foo"); ^ 320. buf[1]= strdup("foobar"); 321. #107 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:396: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 395 is not freed after the last access at line 396, column 3. 394. 395. rc= mysql_stmt_bind_param(stmt, bind); 396. check_stmt_rc(rc, stmt); ^ 397. 398. rc= mysql_stmt_execute(stmt); #108 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:463: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 462 is not freed after the last access at line 463, column 3. 461. 462. rc= mysql_stmt_bind_param(stmt, bind); 463. check_stmt_rc(rc, stmt); ^ 464. 465. rc= mysql_stmt_execute(stmt); #109 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:582: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 578 is not freed after the last access at line 582, column 3. 580. /* execute */ 581. rc= mysql_stmt_execute(stmt); 582. check_stmt_rc(rc, stmt); ^ 583. 584. mysql_stmt_close(stmt); #110 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:662: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 661 is not freed after the last access at line 662, column 3. 660. 661. rc= mysql_stmt_bind_param(stmt, &bind_in); 662. check_stmt_rc(rc, stmt); ^ 663. 664. rc= mysql_stmt_execute(stmt); #111 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:718: error: Null Dereference(NULLPTR_DEREFERENCE) `buffer[_]` could be null (null value originating from line 717) and is dereferenced. 716. stmt= mysql_stmt_init(mysql); 717. buffer[0]= calloc(1, 7); 718. strcpy (buffer[0], "\xC3\x82\xC3\x83\xC3\x84\x00"); ^ 719. 720. rc= mysql_query(mysql, "SET NAMES UTF8"); #112 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:739: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 738 is not freed after the last access at line 739, column 3. 737. 738. rc= mysql_stmt_bind_param(stmt, &bind_in); 739. check_stmt_rc(rc, stmt); ^ 740. 741. rc= mysql_stmt_execute(stmt); #113 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:779: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc` on line 717 is not freed after the last access at line 779, column 1. 777. 778. return OK; 779. } ^ 780. 781. #114 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:846: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 842 is not freed after the last access at line 846, column 3. 844. /* execute */ 845. rc= mysql_stmt_execute(stmt); 846. check_stmt_rc(rc, stmt); ^ 847. 848. mysql_stmt_close(stmt); #115 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:955: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 954 is not freed after the last access at line 955, column 3. 953. 954. rc= mysql_stmt_bind_param(stmt, bind); 955. check_stmt_rc(rc, stmt); ^ 956. rc= mysql_stmt_execute(stmt); 957. check_stmt_rc(rc, stmt); #116 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/bulk1.c:1006: error: Dead Store(DEAD_STORE) The value written to `&array_size` is never used. 1004. int rc; 1005. MYSQL_BIND bind[2]; 1006. unsigned int array_size= 2; ^ 1007. int val_a[2]= {1,2}; 1008. char indicators[2]= {STMT_INDICATOR_NULL, STMT_INDICATOR_NULL}; #117 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 51) and is dereferenced. 49. 50. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 51. SKIP_MAXSCALE; ^ 52. 53. len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); #118 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 51) is dereferenced. 49. 50. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 51. SKIP_MAXSCALE; ^ 52. 53. len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); #119 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 51) and is dereferenced. 49. 50. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 51. SKIP_MAXSCALE; ^ 52. 53. len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); #120 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 51) is dereferenced. 49. 50. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 51. SKIP_MAXSCALE; ^ 52. 53. len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); #121 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:205: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 198 is not freed after the last access at line 205, column 3. 203. 204. rc= mysql_stmt_execute(stmt); 205. check_stmt_rc(rc, stmt); ^ 206. 207. stmt_text= "SELECT a FROM t1"; #122 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:349: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 343 is not freed after the last access at line 349, column 3. 347. 348. rc= mysql_stmt_execute(stmt); 349. check_stmt_rc(rc, stmt); ^ 350. stmt_text= "SELECT c1, c2 FROM t1"; 351. #123 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:493: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 490 is not freed after the last access at line 493, column 3. 491. FAIL_IF(!rs, "Invalid result set"); 492. row= mysql_fetch_row(rs); 493. FAIL_IF(!row, "Couldn't fetch row"); ^ 494. strcpy(character_set_client, row[1]); 495. mysql_free_result(rs); #124 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:502: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 499 is not freed after the last access at line 502, column 3. 500. FAIL_IF(!rs, "Invalid result set"); 501. row= mysql_fetch_row(rs); 502. FAIL_IF(!row, "Couldn't fetch row"); ^ 503. strcpy(character_set_results, row[1]); 504. mysql_free_result(rs); #125 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:511: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 508 is not freed after the last access at line 511, column 3. 509. FAIL_IF(!rs, "Invalid result set"); 510. row= mysql_fetch_row(rs); 511. FAIL_IF(!row, "Couldn't fetch row"); ^ 512. strcpy(collation_connection, row[1]); 513. mysql_free_result(rs); #126 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:543: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 543) and is dereferenced. 541. char collation_connnection_4[MY_CS_NAME_SIZE]; 542. 543. SKIP_MAXSCALE; ^ 544. 545. if (mysql_get_server_version(mysql) < 50100 || !is_mariadb) #127 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:543: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 543) is dereferenced. 541. char collation_connnection_4[MY_CS_NAME_SIZE]; 542. 543. SKIP_MAXSCALE; ^ 544. 545. if (mysql_get_server_version(mysql) < 50100 || !is_mariadb) #128 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:543: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 543) and is dereferenced. 541. char collation_connnection_4[MY_CS_NAME_SIZE]; 542. 543. SKIP_MAXSCALE; ^ 544. 545. if (mysql_get_server_version(mysql) < 50100 || !is_mariadb) #129 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:543: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 543) is dereferenced. 541. char collation_connnection_4[MY_CS_NAME_SIZE]; 542. 543. SKIP_MAXSCALE; ^ 544. 545. if (mysql_get_server_version(mysql) < 50100 || !is_mariadb) #130 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/charset.c:670: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 658 is not freed after the last access at line 670, column 7. 668. && strcmp(row[0], "utf32")) { 669. rc= mysql_set_character_set(mysql, row[0]); 670. check_mysql_rc(rc, mysql); ^ 671. } 672. } #131 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:37: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 32 is not freed after the last access at line 37, column 3. 35. char query[1024]; 36. 37. SKIP_SKYSQL; ^ 38. SKIP_MAXSCALE; 39. #132 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:38: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 32 is not freed after the last access at line 38, column 3. 36. 37. SKIP_SKYSQL; 38. SKIP_MAXSCALE; ^ 39. 40. if (!is_mariadb) #133 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:38: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 32 is not freed after the last access at line 38, column 3. 36. 37. SKIP_SKYSQL; 38. SKIP_MAXSCALE; ^ 39. 40. if (!is_mariadb) #134 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:40: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 32 is not freed after the last access at line 40, column 8. 38. SKIP_MAXSCALE; 39. 40. if (!is_mariadb) ^ 41. return SKIP; 42. #135 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:43: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 32 is not freed after the last access at line 43, column 9. 41. return SKIP; 42. 43. if (!(fp= fopen("./my-conc66-test.cnf", "w"))) ^ 44. return FAIL; 45. #136 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:96: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 96) and is dereferenced. 94. 95. SKIP_SKYSQL; 96. SKIP_MAXSCALE; ^ 97. 98. if (!is_mariadb) #137 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:96: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 96) is dereferenced. 94. 95. SKIP_SKYSQL; 96. SKIP_MAXSCALE; ^ 97. 98. if (!is_mariadb) #138 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:96: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 96) and is dereferenced. 94. 95. SKIP_SKYSQL; 96. SKIP_MAXSCALE; ^ 97. 98. if (!is_mariadb) #139 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:96: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 96) is dereferenced. 94. 95. SKIP_SKYSQL; 96. SKIP_MAXSCALE; ^ 97. 98. if (!is_mariadb) #140 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:170: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 168. /* Set MAX_JOIN_SIZE to the default value (-1). */ 169. 170. rc= mysql_query(mysql, "SET @@global.max_join_size = cast(-1 as unsigned int)"); ^ 171. rc= mysql_query(mysql, "SET @@session.max_join_size = default"); 172. #141 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:171: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 169. 170. rc= mysql_query(mysql, "SET @@global.max_join_size = cast(-1 as unsigned int)"); 171. rc= mysql_query(mysql, "SET @@session.max_join_size = default"); ^ 172. 173. /* Issue COM_CHANGE_USER. */ #142 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:224: error: Dead Store(DEAD_STORE) The value written to `&user_pw` is never used. 222. { 223. char buff[256]; 224. const char *user_pw= "mysqltest_pw"; ^ 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; #143 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:225: error: Dead Store(DEAD_STORE) The value written to `&user_no_pw` is never used. 223. char buff[256]; 224. const char *user_pw= "mysqltest_pw"; 225. const char *user_no_pw= "mysqltest_no_pw"; ^ 226. const char *pw= "password"; 227. const char *db= "mysqltest_user_test_database"; #144 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:226: error: Dead Store(DEAD_STORE) The value written to `&pw` is never used. 224. const char *user_pw= "mysqltest_pw"; 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; ^ 227. const char *db= "mysqltest_user_test_database"; 228. int rc; #145 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:227: error: Dead Store(DEAD_STORE) The value written to `&db` is never used. 225. const char *user_no_pw= "mysqltest_no_pw"; 226. const char *pw= "password"; 227. const char *db= "mysqltest_user_test_database"; ^ 228. int rc; 229. #146 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:537: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 537) and is dereferenced. 535. MYSQL_ROW row; 536. int rc; 537. SKIP_MAXSCALE; ^ 538. 539. mysql= mysql_init(NULL); #147 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:537: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 537) is dereferenced. 535. MYSQL_ROW row; 536. int rc; 537. SKIP_MAXSCALE; ^ 538. 539. mysql= mysql_init(NULL); #148 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:537: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 537) and is dereferenced. 535. MYSQL_ROW row; 536. int rc; 537. SKIP_MAXSCALE; ^ 538. 539. mysql= mysql_init(NULL); #149 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:537: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 537) is dereferenced. 535. MYSQL_ROW row; 536. int rc; 537. SKIP_MAXSCALE; ^ 538. 539. mysql= mysql_init(NULL); #150 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:543: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 541. 542. /* use compressed protocol */ 543. rc= mysql_options(mysql, MYSQL_OPT_COMPRESS, NULL); ^ 544. 545. if (!(my_test_connect(mysql, hostname, username, #151 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:570: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 570) and is dereferenced. 568. int rc; 569. my_bool reconnect; 570. SKIP_MAXSCALE; ^ 571. 572. mysql1= mysql_init(NULL); #152 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:570: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 570) is dereferenced. 568. int rc; 569. my_bool reconnect; 570. SKIP_MAXSCALE; ^ 571. 572. mysql1= mysql_init(NULL); #153 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:570: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 570) and is dereferenced. 568. int rc; 569. my_bool reconnect; 570. SKIP_MAXSCALE; ^ 571. 572. mysql1= mysql_init(NULL); #154 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:570: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 570) is dereferenced. 568. int rc; 569. my_bool reconnect; 570. SKIP_MAXSCALE; ^ 571. 572. mysql1= mysql_init(NULL); #155 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:618: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 618) is dereferenced. 616. unsigned int check_server_version= 0; 617. int major=0, minor= 0, patch=0; 618. SKIP_MAXSCALE; ^ 619. 620. if (strlen(mysql_get_server_info(mysql)) > 63) #156 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:618: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 618) is dereferenced. 616. unsigned int check_server_version= 0; 617. int major=0, minor= 0, patch=0; 618. SKIP_MAXSCALE; ^ 619. 620. if (strlen(mysql_get_server_info(mysql)) > 63) #157 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:652: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql` could be null (from the call to `mysql_init()` on line 647) and is dereferenced. 650. FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, socketname, CLIENT_REMEMBER_OPTIONS), 651. "Error expected"); 652. FAIL_IF(!mysql->options.charset_name || strcmp(mysql->options.charset_name, "ascii") != 0, ^ 653. "expected charsetname=ascii"); 654. mysql_close(mysql); #158 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:652: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql` could be null (null value originating from line 647) and is dereferenced. 650. FAIL_IF(my_test_connect(mysql, hostname, "notexistinguser", "password", schema, port, socketname, CLIENT_REMEMBER_OPTIONS), 651. "Error expected"); 652. FAIL_IF(!mysql->options.charset_name || strcmp(mysql->options.charset_name, "ascii") != 0, ^ 653. "expected charsetname=ascii"); 654. mysql_close(mysql); #159 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:691: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 691) and is dereferenced. 689. 690. SKIP_SKYSQL; 691. SKIP_MAXSCALE; ^ 692. SKIP_TLS; 693. #160 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:691: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 691) is dereferenced. 689. 690. SKIP_SKYSQL; 691. SKIP_MAXSCALE; ^ 692. SKIP_TLS; 693. #161 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:691: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 691) and is dereferenced. 689. 690. SKIP_SKYSQL; 691. SKIP_MAXSCALE; ^ 692. SKIP_TLS; 693. #162 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:691: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 691) is dereferenced. 689. 690. SKIP_SKYSQL; 691. SKIP_MAXSCALE; ^ 692. SKIP_TLS; 693. #163 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:763: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 763) and is dereferenced. 761. my_bool reconnect= 1; 762. SKIP_SKYSQL; 763. SKIP_MAXSCALE; ^ 764. 765. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #164 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:763: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 763) is dereferenced. 761. my_bool reconnect= 1; 762. SKIP_SKYSQL; 763. SKIP_MAXSCALE; ^ 764. 765. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #165 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:763: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 763) and is dereferenced. 761. my_bool reconnect= 1; 762. SKIP_SKYSQL; 763. SKIP_MAXSCALE; ^ 764. 765. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #166 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:763: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 763) is dereferenced. 761. my_bool reconnect= 1; 762. SKIP_SKYSQL; 763. SKIP_MAXSCALE; ^ 764. 765. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #167 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:769: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 767. mysql->options.unused_1= 1; 768. 769. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 770. 771. mysql_ping(mysql); #168 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:778: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 776. FAIL_IF(mysql->options.unused_1 != 1, "options got lost"); 777. 778. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 779. 780. mysql_ping(mysql); #169 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:829: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 827. 828. sprintf(query, "DROP USER '%s'@'%s'", username, bind_addr); 829. rc= mysql_query(my, query); ^ 830. 831. sprintf(query, "CREATE USER '%s'@'%s' IDENTIFIED BY '%s'", username, bind_addr, password); #170 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1070: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1066 is not freed after the last access at line 1070, column 3. 1068. int i; 1069. 1070. SKIP_SKYSQL; ^ 1071. SKIP_TRAVIS(); 1072. #171 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1071: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1066 is not freed after the last access at line 1071, column 3. 1069. 1070. SKIP_SKYSQL; 1071. SKIP_TRAVIS(); ^ 1072. 1073. if (!(fp= fopen("./dummy_sock", "w"))) #172 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1073: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1066 is not freed after the last access at line 1073, column 9. 1071. SKIP_TRAVIS(); 1072. 1073. if (!(fp= fopen("./dummy_sock", "w"))) ^ 1074. { 1075. diag("couldn't create dummy socket"); #173 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1159: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1159, column 3. 1157. my_ulonglong num_rows= 0; 1158. char query[1024]; 1159. SKIP_MAXSCALE; ^ 1160. 1161. if (IS_SKYSQL(hostname)) #174 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1159: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1159, column 3. 1157. my_ulonglong num_rows= 0; 1158. char query[1024]; 1159. SKIP_MAXSCALE; ^ 1160. 1161. if (IS_SKYSQL(hostname)) #175 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1159: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1159) is dereferenced. 1157. my_ulonglong num_rows= 0; 1158. char query[1024]; 1159. SKIP_MAXSCALE; ^ 1160. 1161. if (IS_SKYSQL(hostname)) #176 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1159: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1159, column 3. 1157. my_ulonglong num_rows= 0; 1158. char query[1024]; 1159. SKIP_MAXSCALE; ^ 1160. 1161. if (IS_SKYSQL(hostname)) #177 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1159: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1159) is dereferenced. 1157. my_ulonglong num_rows= 0; 1158. char query[1024]; 1159. SKIP_MAXSCALE; ^ 1160. 1161. if (IS_SKYSQL(hostname)) #178 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1161: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1161, column 7. 1159. SKIP_MAXSCALE; 1160. 1161. if (IS_SKYSQL(hostname)) ^ 1162. return SKIP; 1163. #179 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1165: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1165, column 3. 1163. 1164. // xpand doesn't have information_schema.plugins 1165. SKIP_XPAND; ^ 1166. 1167. if (!mysql_client_find_plugin(mysql, "sha256_password", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) #180 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1165: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1165, column 3. 1163. 1164. // xpand doesn't have information_schema.plugins 1165. SKIP_XPAND; ^ 1166. 1167. if (!mysql_client_find_plugin(mysql, "sha256_password", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) #181 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1175: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1154 is not freed after the last access at line 1175, column 3. 1173. 1174. rc= mysql_query(my, "SELECT * FROM information_schema.plugins where plugin_name='sha256_password'"); 1175. check_mysql_rc(rc, mysql); ^ 1176. 1177. res= mysql_store_result(my); #182 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1226: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1226) is dereferenced. 1224. 1225. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 1226. SKIP_MAXSCALE; ^ 1227. 1228. if (!(fp= fopen("./mdev13100.cnf", "w"))) #183 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1226: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1226) is dereferenced. 1224. 1225. /* MXS-4898: MaxScale sends utf8mb4 in handshake OK packet */ 1226. SKIP_MAXSCALE; ^ 1227. 1228. if (!(fp= fopen("./mdev13100.cnf", "w"))) #184 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1252: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1251 is not freed after the last access at line 1252, column 9. 1250. /* value from client-mariadb group */ 1251. mysql= mysql_init(NULL); 1252. if (!(fp= fopen("./mdev13100.cnf", "w"))) ^ 1253. return FAIL; 1254. #185 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1277: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1275 is not freed after the last access at line 1277, column 7. 1275. mysql= mysql_init(NULL); 1276. 1277. if (!(fp= fopen("./mdev13100.cnf", "w"))) ^ 1278. return FAIL; 1279. #186 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1303: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1302 is not freed after the last access at line 1303, column 9. 1301. /* values from mdev-13100 group */ 1302. mysql= mysql_init(NULL); 1303. if (!(fp= fopen("./mdev13100.cnf", "w"))) ^ 1304. return FAIL; 1305. #187 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1333: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1332 is not freed after the last access at line 1333, column 9. 1331. /* values from [programname] group */ 1332. mysql= mysql_init(NULL); 1333. if (!(fp= fopen("./mdev13100.cnf", "w"))) ^ 1334. return FAIL; 1335. #188 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1408: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1406. } 1407. sprintf(query, "DROP USER 'foo'@'%s'", this_host); 1408. rc= mysql_query(my, query); ^ 1409. 1410. sprintf(query, "CREATE USER 'foo'@'%s' IDENTIFIED BY 'foo'", this_host); #189 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1458: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1458) and is dereferenced. 1456. const char *csname; 1457. SKIP_SKYSQL; 1458. SKIP_MAXSCALE; ^ 1459. 1460. if (!is_mariadb) #190 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1458: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1458) is dereferenced. 1456. const char *csname; 1457. SKIP_SKYSQL; 1458. SKIP_MAXSCALE; ^ 1459. 1460. if (!is_mariadb) #191 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1458: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1458) and is dereferenced. 1456. const char *csname; 1457. SKIP_SKYSQL; 1458. SKIP_MAXSCALE; ^ 1459. 1460. if (!is_mariadb) #192 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1458: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1458) is dereferenced. 1456. const char *csname; 1457. SKIP_SKYSQL; 1458. SKIP_MAXSCALE; ^ 1459. 1460. if (!is_mariadb) #193 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1498: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1496 is not freed after the last access at line 1498, column 3. 1496. mysql= mysql_init(NULL); 1497. fp= fopen(cnf_file1, "w"); 1498. FAIL_IF(!fp, "fopen"); ^ 1499. 1500. fprintf(fp, "[client]\ndefault-character-set = latin2\nreconnect= 1\n"); #194 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1621: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1618 is not freed after the last access at line 1621, column 3. 1619. int server_status1, server_status2; 1620. 1621. SKIP_SKYSQL; ^ 1622. SKIP_MAXSCALE; 1623. #195 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1622: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1618 is not freed after the last access at line 1622, column 3. 1620. 1621. SKIP_SKYSQL; 1622. SKIP_MAXSCALE; ^ 1623. 1624. mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "utf8mb4"); #196 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1622: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1618 is not freed after the last access at line 1622, column 3. 1620. 1621. SKIP_SKYSQL; 1622. SKIP_MAXSCALE; ^ 1623. 1624. mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "utf8mb4"); #197 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1622: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1618 is not freed after the last access at line 1622, column 3. 1620. 1621. SKIP_SKYSQL; 1622. SKIP_MAXSCALE; ^ 1623. 1624. mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "utf8mb4"); #198 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1699: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1697. 1698. sprintf(query, "DROP USER 'foo'@'%s'", this_host); 1699. rc= mysql_query(my, query); ^ 1700. 1701. sprintf(query, "CREATE USER 'foo'@'%s' IDENTIFIED WITH caching_sha2_password BY 'foo'", this_host); #199 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1738: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1738) and is dereferenced. 1736. 1737. SKIP_SKYSQL; 1738. SKIP_MAXSCALE; ^ 1739. 1740. if (!is_mariadb) #200 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1738: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1738) is dereferenced. 1736. 1737. SKIP_SKYSQL; 1738. SKIP_MAXSCALE; ^ 1739. 1740. if (!is_mariadb) #201 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1738: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1738) and is dereferenced. 1736. 1737. SKIP_SKYSQL; 1738. SKIP_MAXSCALE; ^ 1739. 1740. if (!is_mariadb) #202 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1738: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1738) is dereferenced. 1736. 1737. SKIP_SKYSQL; 1738. SKIP_MAXSCALE; ^ 1739. 1740. if (!is_mariadb) #203 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1832: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1830 is not freed after the last access at line 1832, column 3. 1830. MYSQL *mysql= mysql_init(NULL); 1831. 1832. SKIP_MAXSCALE; ^ 1833. 1834. mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); #204 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1832: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1830 is not freed after the last access at line 1832, column 3. 1830. MYSQL *mysql= mysql_init(NULL); 1831. 1832. SKIP_MAXSCALE; ^ 1833. 1834. mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); #205 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1832: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1832) is dereferenced. 1830. MYSQL *mysql= mysql_init(NULL); 1831. 1832. SKIP_MAXSCALE; ^ 1833. 1834. mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); #206 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1832: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1830 is not freed after the last access at line 1832, column 3. 1830. MYSQL *mysql= mysql_init(NULL); 1831. 1832. SKIP_MAXSCALE; ^ 1833. 1834. mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); #207 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1832: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1832) is dereferenced. 1830. MYSQL *mysql= mysql_init(NULL); 1831. 1832. SKIP_MAXSCALE; ^ 1833. 1834. mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); #208 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1846: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1844. 1845. sprintf(query, "KILL %lu", thread_id); 1846. rc= mysql_query(mysql, query); ^ 1847. 1848. sleep(3); #209 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1862: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 1858 is not freed after the last access at line 1862, column 3. 1860. return FAIL; 1861. row= mysql_fetch_row(result); 1862. FAIL_IF(strcmp(row[0],"3"), "Wrong result"); ^ 1863. 1864. mysql_free_result(result); #210 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1875: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1875) and is dereferenced. 1873. 1874. SKIP_SKYSQL; 1875. SKIP_MAXSCALE; ^ 1876. 1877. if (!is_mariadb) #211 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1875: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1875) is dereferenced. 1873. 1874. SKIP_SKYSQL; 1875. SKIP_MAXSCALE; ^ 1876. 1877. if (!is_mariadb) #212 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1875: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1875) and is dereferenced. 1873. 1874. SKIP_SKYSQL; 1875. SKIP_MAXSCALE; ^ 1876. 1877. if (!is_mariadb) #213 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1875: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1875) is dereferenced. 1873. 1874. SKIP_SKYSQL; 1875. SKIP_MAXSCALE; ^ 1876. 1877. if (!is_mariadb) #214 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1914: error: Null Dereference(NULLPTR_DEREFERENCE) `is_mariadb` could be null (null value originating from line 1914) and is dereferenced. 1912. return SKIP; 1913. // https://jira.mariadb.org/browse/XPT-182 1914. SKIP_XPAND; ^ 1915. 1916. rc= mysql_query(mysql, "SET @@session.session_track_state_change=1"); #215 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1967: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1967, column 3. 1965. char query[1024]; 1966. 1967. SKIP_SKYSQL; ^ 1968. SKIP_MAXSCALE; 1969. #216 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1968: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1968, column 3. 1966. 1967. SKIP_SKYSQL; 1968. SKIP_MAXSCALE; ^ 1969. 1970. if (!mysql_client_find_plugin(mysql, "client_ed25519", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) #217 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1968: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1968, column 3. 1966. 1967. SKIP_SKYSQL; 1968. SKIP_MAXSCALE; ^ 1969. 1970. if (!mysql_client_find_plugin(mysql, "client_ed25519", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) #218 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1968: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1968, column 3. 1966. 1967. SKIP_SKYSQL; 1968. SKIP_MAXSCALE; ^ 1969. 1970. if (!mysql_client_find_plugin(mysql, "client_ed25519", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) #219 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1970: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1970, column 8. 1968. SKIP_MAXSCALE; 1969. 1970. if (!mysql_client_find_plugin(mysql, "client_ed25519", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) ^ 1971. { 1972. diag("client_ed25519 plugin not available"); #220 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:1977: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1964 is not freed after the last access at line 1977, column 7. 1975. 1976. rc= mysql_query(mysql, "INSTALL SONAME 'auth_ed25519'"); 1977. if (rc) ^ 1978. { 1979. diag("feature not supported, ed25519 plugin not available"); #221 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2067: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2065 is not freed after the last access at line 2067, column 9. 2065. mysql= mysql_init(NULL); 2066. 2067. if (!(fp= fopen("./conc274.cnf", "w"))) ^ 2068. return FAIL; 2069. #222 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2157: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2154 is not freed after the last access at line 2157, column 3. 2155. char tmp[1024]; 2156. my_bool reconnect= 1; 2157. SKIP_MAXSCALE; ^ 2158. 2159. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #223 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2157: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2154 is not freed after the last access at line 2157, column 3. 2155. char tmp[1024]; 2156. my_bool reconnect= 1; 2157. SKIP_MAXSCALE; ^ 2158. 2159. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #224 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2157: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2157) is dereferenced. 2155. char tmp[1024]; 2156. my_bool reconnect= 1; 2157. SKIP_MAXSCALE; ^ 2158. 2159. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #225 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2157: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2154 is not freed after the last access at line 2157, column 3. 2155. char tmp[1024]; 2156. my_bool reconnect= 1; 2157. SKIP_MAXSCALE; ^ 2158. 2159. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #226 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2157: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2157) is dereferenced. 2155. char tmp[1024]; 2156. my_bool reconnect= 1; 2157. SKIP_MAXSCALE; ^ 2158. 2159. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #227 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2178: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2176. { 2177. diag("Error: %s", mysql_error(mysql)); 2178. rc= FAIL; ^ 2179. } 2180. #228 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2253: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2251. struct st_callback data= {0,"", ""}; 2252. 2253. rc= mysql_optionsv(mysql, MARIADB_OPT_STATUS_CALLBACK, my_status_callback, &data); ^ 2254. 2255. if (!my_test_connect(mysql, hostname, username, #229 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2309: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2307. } 2308. 2309. rc= mysql_query(mysql, "DROP PROCEDURE conc632"); ^ 2310. 2311. rc= mysql_query(mysql, "CREATE PROCEDURE conc632() " #230 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2368: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2368) is dereferenced. 2366. my_bool verify= 0; 2367. 2368. SKIP_MAXSCALE; ^ 2369. 2370. for (i=0; i < 3; i++) #231 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2368: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2368) is dereferenced. 2366. my_bool verify= 0; 2367. 2368. SKIP_MAXSCALE; ^ 2369. 2370. for (i=0; i < 3; i++) #232 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2386: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_get_ssl_cipher()` could be null (from the call to `mysql_get_ssl_cipher()` on line 2386) and is dereferenced. 2384. } 2385. 2386. FAIL_IF(strcmp(ciphers[i], mysql_get_ssl_cipher(mysql)), "Cipher mismatch"); ^ 2387. mariadb_get_infov(mysql, MARIADB_CONNECTION_TLS_VERSION, &tls_version); 2388. FAIL_IF(strcmp(tls_version, "TLSv1.3"), "TLS version mismatch"); #233 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2403: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2398 is not freed after the last access at line 2403, column 3. 2401. unsigned long last_thread_id= 0; 2402. 2403. SKIP_MAXSCALE; ^ 2404. 2405. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #234 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2403: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2398 is not freed after the last access at line 2403, column 3. 2401. unsigned long last_thread_id= 0; 2402. 2403. SKIP_MAXSCALE; ^ 2404. 2405. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #235 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2403: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2403) is dereferenced. 2401. unsigned long last_thread_id= 0; 2402. 2403. SKIP_MAXSCALE; ^ 2404. 2405. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #236 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2403: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 2398 is not freed after the last access at line 2403, column 3. 2401. unsigned long last_thread_id= 0; 2402. 2403. SKIP_MAXSCALE; ^ 2404. 2405. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #237 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/connection.c:2403: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2403) is dereferenced. 2401. unsigned long last_thread_id= 0; 2402. 2403. SKIP_MAXSCALE; ^ 2404. 2405. mysql_options(mysql, MYSQL_OPT_RECONNECT, &reconnect); #238 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:316: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc` on line 312 is not freed after the last access at line 316, column 3. 314. Stmt_fetch *fetch; 315. 316. FAIL_IF(fill_tables(mysql, create_table, sizeof(create_table) / sizeof(*create_table)), "fill_tables failed"); ^ 317. 318. for (fetch= fetch_array; fetch < fetch_array + cursor_count; ++fetch) #239 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:378: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 376. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 377. } 378. rc= mysql_stmt_close(stmt); ^ 379. 380. rc= mysql_query(mysql, "drop table t1"); #240 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:429: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 427. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 428. } 429. rc= mysql_stmt_close(stmt); ^ 430. 431. rc= mysql_query(mysql, "drop table t1"); #241 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:452: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 452) is dereferenced. 450. 451. // https://jira.mariadb.org/browse/XPT-266 452. if (IS_XPAND()) { ^ 453. rc= mysql_query(mysql, "SET NAMES UTF8"); 454. check_mysql_rc(rc, mysql); #242 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:475: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 474 is not freed after the last access at line 475, column 3. 473. my_bind[1].length= &a_len; 474. rc= mysql_stmt_bind_param(stmt, my_bind); 475. check_stmt_rc(rc, stmt); ^ 476. for (i= 0; i < 42; i++) 477. { #243 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:478: error: Dead Store(DEAD_STORE) The value written to `&id_val` is never used. 476. for (i= 0; i < 42; i++) 477. { 478. id_val= (i+1)*10; ^ 479. sprintf(a, "a%d", i); 480. a_len= (unsigned long)strlen(a); /* safety against broken sprintf */ #244 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:486: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 484. 485. stmt_text= "select name from t1"; 486. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); ^ 487. type= (ulong) CURSOR_TYPE_READ_ONLY; 488. mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void*) &type); #245 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:575: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 573. rc= mysql_stmt_execute(stmt); 574. check_stmt_rc(rc, stmt);; 575. rc= mysql_query(mysql, "update t1 set id=id+100"); ^ 576. /* 577. If cursors are not materialized, the update will return an error; #246 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:611: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 609. mysql_stmt_bind_result(stmt, my_bind); 610. 611. rc= mysql_stmt_execute(stmt); ^ 612. rc= mysql_stmt_fetch(stmt); 613. FAIL_UNLESS(rc == 0, "rc != 0"); #247 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:614: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 612. rc= mysql_stmt_fetch(stmt); 613. FAIL_UNLESS(rc == 0, "rc != 0"); 614. rc= mysql_rollback(mysql); /* should close the cursor */ ^ 615. } 616. #248 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:673: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 672 is not freed after the last access at line 673, column 5. 671. { 672. rc= mysql_stmt_bind_param(stmt, bind_in); 673. check_stmt_rc(rc, stmt); ^ 674. rc= mysql_stmt_bind_result(stmt, bind_out); 675. check_stmt_rc(rc, stmt); #249 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:863: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 862 is not freed after the last access at line 863, column 3. 861. my_bind[0].buffer= &empno; 862. rc= mysql_stmt_bind_param(stmt, my_bind); 863. check_stmt_rc(rc, stmt); ^ 864. 865. my_bind[1].buffer_type= MYSQL_TYPE_VAR_STRING; #250 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:873: error: Dead Store(DEAD_STORE) The value written to `&empno` is never used. 871. check_stmt_rc(rc, stmt); 872. 873. empno= 10; ^ 874. 875. /* ERROR: next statement causes a server crash */ #251 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1352: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1350. rc= mysql_query(mysql, "insert into t1 (a) values (repeat('a', 256))"); 1351. check_mysql_rc(rc, mysql); 1352. rc= mysql_query(mysql, "set @@session.max_heap_table_size=16384"); ^ 1353. 1354. /* Create a big enough table (more than max_heap_table_size) */ #252 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1369: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1367. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); 1368. check_stmt_rc(rc, stmt); 1369. rc= mysql_stmt_execute(stmt); ^ 1370. while ((rc= mysql_stmt_fetch(stmt)) == 0); 1371. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); #253 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1373: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1371. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 1372. 1373. rc= mysql_stmt_close(stmt); ^ 1374. 1375. rc= mysql_query(mysql, "drop table t1"); #254 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1394: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 1394) and is dereferenced. 1392. 1393. // works with xpand 1394. SKIP_XPAND; ^ 1395. 1396. stmt= open_cursor(mysql, "select 1 into @a"); #255 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1394: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1394) is dereferenced. 1392. 1393. // works with xpand 1394. SKIP_XPAND; ^ 1395. 1396. stmt= open_cursor(mysql, "select 1 into @a"); #256 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1423: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1421. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 1422. check_mysql_rc(rc, mysql); 1423. rc= mysql_query(mysql, "DROP VIEW IF EXISTS v1"); ^ 1424. rc= mysql_query(mysql, "CREATE TABLE t1 (a INTEGER)"); 1425. check_mysql_rc(rc, mysql); #257 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/cursor.c:1654: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1652. rc= mysql_stmt_reset(stmt); 1653. check_stmt_rc(rc, stmt); 1654. rc= mysql_stmt_fetch(stmt); ^ 1655. 1656. /* mariadb client supports GEOMETRY, so no error will #258 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/dyncol.c:49: error: Null Dereference(NULLPTR_DEREFERENCE) `i` could be null (null value originating from line 45) and is dereferenced. 47. for (i=0; i < column_count; i++) 48. { 49. vals[i].type= DYN_COL_STRING; ^ 50. vals[i].x.string.value.str= (char *)strval[i]; 51. vals[i].x.string.value.length= strlen(strval[i]); #259 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/dyncol.c:57: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 55. 56. mariadb_dyncol_init(&dyncol); 57. rc= mariadb_dyncol_create_many_named(&dyncol, column_count, keys1, vals, 0); ^ 58. mariadb_dyncol_free(&dyncol); 59. FAIL_IF(mariadb_dyncol_create_many_named(&dyncol, column_count, keys1, vals, 1) < 0, "Error"); #260 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/dyncol.c:293: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mariadb_dyncol_json()` on line 290 is not freed after the last access at line 293, column 5. 291. if (strcmp(s.str, "{\"0\":17,\"1\":{\"0\":17}}") != 0) 292. { 293. diag("%s != %s", s.str, "{\"0\":17,\"1\":{\"0\":17}}"); ^ 294. return FAIL; 295. } #261 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/dyncol.c:293: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `realloc`, indirectly via call to `mariadb_dyncol_json()` on line 290 is not freed after the last access at line 293, column 5. 291. if (strcmp(s.str, "{\"0\":17,\"1\":{\"0\":17}}") != 0) 292. { 293. diag("%s != %s", s.str, "{\"0\":17,\"1\":{\"0\":17}}"); ^ 294. return FAIL; 295. } #262 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:32: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 32) and is dereferenced. 30. int rc; 31. 32. SKIP_XPAND; ^ 33. 34. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #263 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:32: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 32) is dereferenced. 30. int rc; 31. 32. SKIP_XPAND; ^ 33. 34. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #264 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 51) and is dereferenced. 49. const char *query= "DROP TABLE IF EXISTS test_non_exists"; 50. 51. SKIP_XPAND; ^ 52. 53. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #265 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:51: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 51) is dereferenced. 49. const char *query= "DROP TABLE IF EXISTS test_non_exists"; 50. 51. SKIP_XPAND; ^ 52. 53. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #266 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:75: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 75) and is dereferenced. 73. MYSQL_RES *result; 74. 75. SKIP_XPAND; ^ 76. 77. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #267 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:75: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 75) is dereferenced. 73. MYSQL_RES *result; 74. 75. SKIP_XPAND; ^ 76. 77. rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); #268 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:87: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 85 is not freed after the last access at line 87, column 3. 85. result= mysql_store_result(mysql); 86. FAIL_IF(!result, mysql_error(mysql)); 87. FAIL_IF(!mysql_num_rows(result), "Empty resultset"); ^ 88. 89. mysql_free_result(result); #269 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:155: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 153 is not freed after the last access at line 155, column 3. 153. result= mysql_store_result(mysql); 154. FAIL_IF(!result, mysql_error(mysql)); 155. FAIL_IF(!mysql_num_rows(result), "Empty resultset"); ^ 156. mysql_free_result(result); 157. #270 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:290: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 290) is dereferenced. 288. const char *data= "test"; 289. 290. SKIP_MAXSCALE; ^ 291. SKIP_MYSQL(mysql); 292. #271 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:290: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 290) is dereferenced. 288. const char *data= "test"; 289. 290. SKIP_MAXSCALE; ^ 291. SKIP_MYSQL(mysql); 292. #272 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/errors.c:293: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 291. SKIP_MYSQL(mysql); 292. 293. rc= mysql_select_db(mysql, schema); ^ 294. 295. rc= mysql_query(mysql, "DROP TABLE IF EXISTS bulk1"); #273 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:88: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 86. rc= mariadb_stmt_execute_direct(stmt, "DROP TABLE IF EXISTS execute_direct", -1); 87. check_stmt_rc(rc, stmt); 88. rc= mariadb_stmt_execute_direct(stmt, "CREATE TABLE execute_direct (a int, b varchar(20))", -1); ^ 89. rc= mysql_stmt_close(stmt); 90. stmt= mysql_stmt_init(mysql); #274 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:141: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 130) and is dereferenced in the call to `mysql_stmt_attr_set()`. 139. bind.error = &error; */ 140. 141. mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count); ^ 142. check_stmt_rc(mysql_stmt_bind_param(stmt, &bind), stmt); 143. check_stmt_rc(mariadb_stmt_execute_direct(stmt, "SELECT ?", -1), stmt); #275 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:171: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 169. 170. 171. rc= mysql_stmt_close(stmt); ^ 172. 173. return OK; #276 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:191: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 178) and is dereferenced in the call to `mysql_stmt_attr_set()`. 189. bind[0].error = &error; 190. 191. mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count); ^ 192. check_stmt_rc(mysql_stmt_bind_param(stmt, bind), stmt); 193. check_stmt_rc(mariadb_stmt_execute_direct(stmt, "SELECT ?", -1), stmt); #277 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:200: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 200 is not freed after the last access at line 200, column 3. 198. param_count= 1; 199. mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count); 200. check_stmt_rc(mysql_stmt_bind_param(stmt, bind), stmt); ^ 201. check_stmt_rc(mariadb_stmt_execute_direct(stmt, "SELECT ?", -1), stmt); 202. mysql_stmt_close(stmt); #278 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:215: error: Null Dereference(NULLPTR_DEREFERENCE) null (from the call to `mysql_stmt_init()` on line 214) is dereferenced in the call to `mysql_stmt_attr_set()`. 213. 214. stmt= mysql_stmt_init(mysql); 215. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor_type); ^ 216. check_stmt_rc(rc, stmt); 217. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows); #279 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:216: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 214) and is dereferenced in the call to `mysql_stmt_error()`. 214. stmt= mysql_stmt_init(mysql); 215. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor_type); 216. check_stmt_rc(rc, stmt); ^ 217. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows); 218. check_stmt_rc(rc, stmt); #280 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:217: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 214) and is dereferenced in the call to `mysql_stmt_attr_set()`. 215. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, &cursor_type); 216. check_stmt_rc(rc, stmt); 217. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows); ^ 218. check_stmt_rc(rc, stmt); 219. rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL", -1); #281 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/features-10_2.c:218: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 214) and is dereferenced in the call to `mysql_stmt_error()`. 216. check_stmt_rc(rc, stmt); 217. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREFETCH_ROWS, &prefetch_rows); 218. check_stmt_rc(rc, stmt); ^ 219. rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL", -1); 220. check_stmt_rc(rc, stmt); #282 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/fetch.c:237: error: Dead Store(DEAD_STORE) The value written to `&row` is never used. 235. check_stmt_rc(rc,stmt); 236. 237. row= mysql_stmt_row_seek(stmt, row); ^ 238. 239. rc= mysql_stmt_fetch(stmt); #283 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/logs.c:102: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 100. id= 9876; 101. strcpy((char *)data, "MySQL - Open Source Database"); 102. length= strlen(data); ^ 103. 104. rc= mysql_stmt_bind_param(stmt, my_bind); #284 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/logs.c:105: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 104 is not freed after the last access at line 105, column 3. 103. 104. rc= mysql_stmt_bind_param(stmt, my_bind); 105. check_stmt_rc(rc, stmt); ^ 106. 107. rc= mysql_stmt_execute(stmt); #285 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/logs.c:111: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 109. 110. strcpy((char *)data, "'"); 111. length= 1; ^ 112. 113. rc= mysql_stmt_execute(stmt); #286 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/logs.c:117: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 115. 116. strcpy((char *)data, "\""); 117. length= 1; ^ 118. 119. rc= mysql_stmt_execute(stmt); #287 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/logs.c:123: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 121. 122. strcpy((char *)data, "my\'sql\'"); 123. length= strlen(data); ^ 124. rc= mysql_stmt_execute(stmt); 125. check_stmt_rc(rc, stmt); #288 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:42: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 42) and is dereferenced. 40. 41. SKIP_SKYSQL; 42. SKIP_MAXSCALE; ^ 43. SKIP_XPAND; 44. #289 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:42: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 42) is dereferenced. 40. 41. SKIP_SKYSQL; 42. SKIP_MAXSCALE; ^ 43. SKIP_XPAND; 44. #290 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:42: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 42) and is dereferenced. 40. 41. SKIP_SKYSQL; 42. SKIP_MAXSCALE; ^ 43. SKIP_XPAND; 44. #291 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:42: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 42) is dereferenced. 40. 41. SKIP_SKYSQL; 42. SKIP_MAXSCALE; ^ 43. SKIP_XPAND; 44. #292 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:178: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 178) and is dereferenced. 176. { 177. int i; 178. SKIP_MAXSCALE; ^ 179. 180. if (!is_mariadb) #293 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:178: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 178) is dereferenced. 176. { 177. int i; 178. SKIP_MAXSCALE; ^ 179. 180. if (!is_mariadb) #294 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:178: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 178) and is dereferenced. 176. { 177. int i; 178. SKIP_MAXSCALE; ^ 179. 180. if (!is_mariadb) #295 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:178: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 178) is dereferenced. 176. { 177. int i; 178. SKIP_MAXSCALE; ^ 179. 180. if (!is_mariadb) #296 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:247: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 247) and is dereferenced. 245. 246. SKIP_MYSQL(mysql); 247. SKIP_XPAND; ^ 248. 249. mysql_autocommit(mysql, TRUE); #297 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:247: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 247) is dereferenced. 245. 246. SKIP_MYSQL(mysql); 247. SKIP_XPAND; ^ 248. 249. mysql_autocommit(mysql, TRUE); #298 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:579: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 578 is not freed after the last access at line 579, column 3. 577. 578. rc= mysql_stmt_bind_param(stmt, my_bind); 579. check_stmt_rc(rc, stmt); ^ 580. 581. tm[0].year= 2014; #299 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:596: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 594. if (verify_col_data(mysql, "t1", "year", "2014-01-01 01:01:01")) { 595. mysql_stmt_close(stmt); 596. rc= mysql_query(mysql, "drop table t1"); ^ 597. return FAIL; 598. } #300 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:627: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 627) and is dereferenced. 625. ulong buf1_len, buf2_len; 626. 627. SKIP_XPAND; ^ 628. 629. if (mysql_get_server_version(mysql) < 50100) { #301 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:627: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 627) is dereferenced. 625. ulong buf1_len, buf2_len; 626. 627. SKIP_XPAND; ^ 628. 629. if (mysql_get_server_version(mysql) < 50100) { #302 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:793: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 793) and is dereferenced. 791. diag("Load local infile client : %ld", (mysql->client_flag & CLIENT_LOCAL_FILES)); 792. 793. SKIP_LOAD_INFILE_DISABLE; ^ 794. SKIP_SKYSQL; 795. #303 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:793: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 793) is dereferenced. 791. diag("Load local infile client : %ld", (mysql->client_flag & CLIENT_LOCAL_FILES)); 792. 793. SKIP_LOAD_INFILE_DISABLE; ^ 794. SKIP_SKYSQL; 795. #304 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:850: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 850) and is dereferenced. 848. FILE *fp; 849. 850. SKIP_LOAD_INFILE_DISABLE; ^ 851. SKIP_SKYSQL; 852. SKIP_XPAND; #305 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:850: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 850) is dereferenced. 848. FILE *fp; 849. 850. SKIP_LOAD_INFILE_DISABLE; ^ 851. SKIP_SKYSQL; 852. SKIP_XPAND; #306 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1043: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1042 is not freed after the last access at line 1043, column 3. 1041. my_bool reconnect= 1; 1042. MYSQL *my= mysql_init(NULL); 1043. SKIP_MAXSCALE; ^ 1044. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, 1045. port, socketname, 0), mysql_error(my)); #307 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1043: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1042 is not freed after the last access at line 1043, column 3. 1041. my_bool reconnect= 1; 1042. MYSQL *my= mysql_init(NULL); 1043. SKIP_MAXSCALE; ^ 1044. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, 1045. port, socketname, 0), mysql_error(my)); #308 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1043: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1043) is dereferenced. 1041. my_bool reconnect= 1; 1042. MYSQL *my= mysql_init(NULL); 1043. SKIP_MAXSCALE; ^ 1044. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, 1045. port, socketname, 0), mysql_error(my)); #309 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1043: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1042 is not freed after the last access at line 1043, column 3. 1041. my_bool reconnect= 1; 1042. MYSQL *my= mysql_init(NULL); 1043. SKIP_MAXSCALE; ^ 1044. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, 1045. port, socketname, 0), mysql_error(my)); #310 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1043: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1043) is dereferenced. 1041. my_bool reconnect= 1; 1042. MYSQL *my= mysql_init(NULL); 1043. SKIP_MAXSCALE; ^ 1044. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, 1045. port, socketname, 0), mysql_error(my)); #311 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1061: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1060 is not freed after the last access at line 1061, column 3. 1059. int timeout= 5, rc; 1060. MYSQL *my= mysql_init(NULL); 1061. SKIP_MAXSCALE; ^ 1062. mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout); 1063. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, #312 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1061: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1060 is not freed after the last access at line 1061, column 3. 1059. int timeout= 5, rc; 1060. MYSQL *my= mysql_init(NULL); 1061. SKIP_MAXSCALE; ^ 1062. mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout); 1063. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, #313 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1061: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1061) is dereferenced. 1059. int timeout= 5, rc; 1060. MYSQL *my= mysql_init(NULL); 1061. SKIP_MAXSCALE; ^ 1062. mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout); 1063. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, #314 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1061: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1060 is not freed after the last access at line 1061, column 3. 1059. int timeout= 5, rc; 1060. MYSQL *my= mysql_init(NULL); 1061. SKIP_MAXSCALE; ^ 1062. mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout); 1063. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, #315 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1061: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1061) is dereferenced. 1059. int timeout= 5, rc; 1060. MYSQL *my= mysql_init(NULL); 1061. SKIP_MAXSCALE; ^ 1062. mysql_options(my, MYSQL_OPT_READ_TIMEOUT, &timeout); 1063. FAIL_IF(!my_test_connect(my, hostname, username, password, schema, #316 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1088: error: Null Dereference(NULLPTR_DEREFERENCE) `hostname` could be null (null value originating from line 1088) and is dereferenced. 1086. MYSQL_ROW row; 1087. SKIP_SKYSQL; 1088. SKIP_XPAND; ^ 1089. 1090. remote_plugin= (void *)mysql_client_find_plugin(mysql, "remote_io", MARIADB_CLIENT_REMOTEIO_PLUGIN); #317 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1088: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1088) is dereferenced. 1086. MYSQL_ROW row; 1087. SKIP_SKYSQL; 1088. SKIP_XPAND; ^ 1089. 1090. remote_plugin= (void *)mysql_client_find_plugin(mysql, "remote_io", MARIADB_CLIENT_REMOTEIO_PLUGIN); #318 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1174: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1172 is not freed after the last access at line 1174, column 3. 1172. mysql= mysql_init(NULL); 1173. fp= fopen(cnf_file1, "w"); 1174. FAIL_IF(!fp, "fopen"); ^ 1175. 1176. fprintf(fp, "[client]\ndefault-character-set=latin2\nreconnect=1\n"); #319 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1293: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1291. // stmt= mysql_stmt_init(mysql); 1292. 1293. rc= mysql_autocommit(mysql, 1); ^ 1294. mariadb_get_infov(mysql, MARIADB_CONNECTION_SERVER_STATUS, &server_status); 1295. FAIL_IF(!(server_status & SERVER_STATUS_AUTOCOMMIT), #320 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1425: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1417 is not freed after the last access at line 1425, column 3. 1423. len= (int)mysql->options.extension->connect_attrs_len; 1424. /* Length: 1 (=len) + 3 (="foo") + 3 (=len) + 999 (="AAA...") = 1006 */ 1425. FAIL_IF(len != 1006, "Wrong length"); ^ 1426. mysql_optionsv(mysql, MYSQL_OPT_CONNECT_ATTR_DELETE, "foo"); 1427. len= (int)mysql->options.extension->connect_attrs_len; #321 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1457: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1455 is not freed after the last access at line 1457, column 3. 1455. mysql= mysql_init(NULL); 1456. fp= fopen(cnf_file1, "w"); 1457. FAIL_IF(!fp, "fopen"); ^ 1458. 1459. /* Mix dash and underscore */ #322 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1478: error: Dead Store(DEAD_STORE) The value written to `&env` is never used. 1476. MYSQL *mysql; 1477. FILE *fp= NULL; 1478. const char *env= getenv("MYSQL_TMP_DIR"); ^ 1479. char cnf_file1[FN_REFLEN + 1]; 1480. #323 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1533: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 1532 is not freed after the last access at line 1533, column 3. 1531. { 1532. MYSQL *mysql= mysql_init(NULL); 1533. FAIL_IF(mysql_get_timeout_value(mysql) != 0, "expected timeout 0"); ^ 1534. mysql_close(mysql); 1535. return OK; #324 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/misc.c:1589: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1587. char buffer[10]; 1588. 1589. rc= mysql_options(mysql, MARIADB_OPT_SKIP_READ_RESPONSE, &skip); ^ 1590. 1591. rc= mysql_real_query(mysql, SL("SELECT 1")); #325 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:59: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 54 is not freed after the last access at line 59, column 3. 57. const char *query= "SELECT 1,2,3 FROM DUAL"; 58. 59. SKIP_MAXSCALE; ^ 60. SKIP_XPAND; 61. #326 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:59: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 54 is not freed after the last access at line 59, column 3. 57. const char *query= "SELECT 1,2,3 FROM DUAL"; 58. 59. SKIP_MAXSCALE; ^ 60. SKIP_XPAND; 61. #327 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:59: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 59) is dereferenced. 57. const char *query= "SELECT 1,2,3 FROM DUAL"; 58. 59. SKIP_MAXSCALE; ^ 60. SKIP_XPAND; 61. #328 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:59: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 54 is not freed after the last access at line 59, column 3. 57. const char *query= "SELECT 1,2,3 FROM DUAL"; 58. 59. SKIP_MAXSCALE; ^ 60. SKIP_XPAND; 61. #329 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:59: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 59) is dereferenced. 57. const char *query= "SELECT 1,2,3 FROM DUAL"; 58. 59. SKIP_MAXSCALE; ^ 60. SKIP_XPAND; 61. #330 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:60: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 54 is not freed after the last access at line 60, column 3. 58. 59. SKIP_MAXSCALE; 60. SKIP_XPAND; ^ 61. 62. stmt= mysql_stmt_init(mysql); #331 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:60: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 54 is not freed after the last access at line 60, column 3. 58. 59. SKIP_MAXSCALE; 60. SKIP_XPAND; ^ 61. 62. stmt= mysql_stmt_init(mysql); #332 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:60: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 60) and is dereferenced. 58. 59. SKIP_MAXSCALE; 60. SKIP_XPAND; ^ 61. 62. stmt= mysql_stmt_init(mysql); #333 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:70: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 68. /* 1. Status is inited, so prepare should work */ 69. 70. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 71. 72. rc= mysql_ping(mysql); #334 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:80: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 78. 79. /* 2. Status is prepared, execute should fail */ 80. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 81. 82. rc= mysql_stmt_execute(stmt); #335 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:100: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 98. stmt= mysql_stmt_init(mysql); 99. 100. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void *)&x); ^ 101. 102. rc= mysql_stmt_prepare(stmt, SL(query)); #336 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:100: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 98) and is dereferenced in the call to `mysql_stmt_attr_set()`. 98. stmt= mysql_stmt_init(mysql); 99. 100. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void *)&x); ^ 101. 102. rc= mysql_stmt_prepare(stmt, SL(query)); #337 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:769: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 768 is not freed after the last access at line 769, column 3. 767. 768. rc= mysql_stmt_bind_param(stmt, my_bind); 769. check_stmt_rc(rc, stmt); ^ 770. 771. /* #338 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:839: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 838 is not freed after the last access at line 839, column 3. 837. 838. rc= mysql_stmt_bind_param(stmt, my_bind); 839. check_stmt_rc(rc, stmt); ^ 840. 841. id= 30; #339 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:841: error: Dead Store(DEAD_STORE) The value written to `&id` is never used. 839. check_stmt_rc(rc, stmt); 840. 841. id= 30; ^ 842. rc= mysql_stmt_execute(stmt); 843. check_stmt_rc(rc, stmt); #340 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:854: error: Dead Store(DEAD_STORE) The value written to `&is_null` is never used. 852. mysql_close(mysql_new); 853. 854. is_null= 1; ^ 855. rc= mysql_stmt_execute(stmt); 856. check_stmt_rc(rc, stmt); #341 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:923: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 921. check_stmt_rc(rc, stmt); 922. 923. rc= mysql_query(mysql, "SELECT * FROM test_open_direct"); ^ 924. 925. result= mysql_store_result(mysql); #342 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:928: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 925 is not freed after the last access at line 928, column 3. 926. FAIL_IF(!result, "invalid resultset"); 927. 928. FAIL_IF(mysql_num_rows(result), "rowcount != 0"); ^ 929. mysql_free_result(result); 930. #343 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1104: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 1102. int rc; 1103. char szData[25]; 1104. int nData= 1; ^ 1105. MYSQL_RES *result; 1106. MYSQL_BIND my_bind[2]; #344 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1112: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1112) is dereferenced. 1110. 1111. // https://jira.mariadb.org/browse/XPT-266 1112. if (IS_XPAND()) { ^ 1113. rc= mysql_query(mysql, "SET NAMES UTF8"); 1114. check_mysql_rc(rc, mysql); #345 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1206: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1206) is dereferenced. 1204. 1205. // https://jira.mariadb.org/browse/XPT-266 1206. if (IS_XPAND()) { ^ 1207. rc= mysql_query(mysql, "SET NAMES UTF8"); 1208. check_mysql_rc(rc, mysql); #346 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1245: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 1243. check_stmt_rc(rc, stmt); 1244. 1245. int_data= 999; ^ 1246. data= (char *)"Michael"; 1247. #347 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1341: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1340 is not freed after the last access at line 1341, column 3. 1339. is_null[1]= 0; 1340. rc= mysql_stmt_bind_param(stmt, my_bind); 1341. check_stmt_rc(rc, stmt); ^ 1342. 1343. length= 40; #348 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1343: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 1341. check_stmt_rc(rc, stmt); 1342. 1343. length= 40; ^ 1344. strcpy(data, "MySQL AB"); 1345. #349 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1438: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1437 is not freed after the last access at line 1438, column 3. 1436. 1437. rc= mysql_stmt_bind_param(stmt, my_bind); 1438. check_stmt_rc(rc, stmt); ^ 1439. length= sprintf(data, "MySQL AB"); 1440. #350 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1531: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 1529. my_bind[0].length= (unsigned long *)&blob_length; 1530. my_bind[0].error= &my_bind[0].error_value; 1531. rc= mysql_stmt_bind_result(stmt, my_bind); ^ 1532. data[16]= 0; 1533. #351 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1600: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1599 is not freed after the last access at line 1600, column 3. 1598. my_bind[1].buffer_type= MYSQL_TYPE_LONG_BLOB; 1599. rc= mysql_stmt_bind_param(stmt, my_bind); 1600. check_stmt_rc(rc, stmt); ^ 1601. 1602. length= 10; #352 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1602: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 1600. check_stmt_rc(rc, stmt); 1601. 1602. length= 10; ^ 1603. strcpy(data, "MySQL AB"); 1604. #353 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1650: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 1648. int rc, rowcount= 0; 1649. char szData[30]= {0}; 1650. int nData= 1; ^ 1651. MYSQL_RES *result; 1652. MYSQL_BIND my_bind[2]; #354 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1660: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1660) is dereferenced. 1658. 1659. // https://jira.mariadb.org/browse/XPT-266 1660. if (IS_XPAND()) { ^ 1661. rc= mysql_query(mysql, "SET NAMES UTF8"); 1662. check_mysql_rc(rc, mysql); #355 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1751: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1751) is dereferenced. 1749. 1750. // https://jira.mariadb.org/browse/XPT-266 1751. if (IS_XPAND()) { ^ 1752. rc= mysql_query(mysql, "SET NAMES UTF8"); 1753. check_mysql_rc(rc, mysql); #356 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1785: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1784 is not freed after the last access at line 1785, column 3. 1783. 1784. rc= mysql_stmt_bind_param(stmt, my_bind); 1785. check_stmt_rc(rc, stmt); ^ 1786. 1787. nData= 100; #357 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:1787: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 1785. check_stmt_rc(rc, stmt); 1786. 1787. nData= 100; ^ 1788. rc= mysql_stmt_execute(stmt); 1789. check_stmt_rc(rc, stmt); #358 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2251: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2250 is not freed after the last access at line 2251, column 3. 2249. 2250. rc= mysql_stmt_bind_param(stmt, my_bind); 2251. check_stmt_rc(rc, stmt); ^ 2252. 2253. my_val= -1; #359 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2253: error: Dead Store(DEAD_STORE) The value written to `&my_val` is never used. 2251. check_stmt_rc(rc, stmt); 2252. 2253. my_val= -1; ^ 2254. rc= mysql_stmt_execute(stmt); 2255. check_stmt_rc(rc, stmt); #360 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2423: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2423) is dereferenced. 2421. 2422. // https://jira.mariadb.org/browse/XPT-266 2423. if (IS_XPAND()) { ^ 2424. rc= mysql_query(mysql, "SET NAMES UTF8"); 2425. check_mysql_rc(rc, mysql); #361 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2453: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2452 is not freed after the last access at line 2453, column 3. 2451. 2452. rc= mysql_stmt_bind_param(stmt, my_bind); 2453. check_stmt_rc(rc, stmt); ^ 2454. 2455. for (i= 0; i < 3; i++) #362 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2745: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2744 is not freed after the last access at line 2745, column 3. 2743. 2744. rc= mysql_stmt_bind_param(stmt, my_bind); 2745. check_stmt_rc(rc, stmt); ^ 2746. 2747. /* now, execute the prepared statement to insert 10 records.. */ #363 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2750: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 2748. for (tiny_data= 0; tiny_data < 3; tiny_data++) 2749. { 2750. length= sprintf(str_data, "MySQL%d", tiny_data); ^ 2751. rc= mysql_stmt_execute(stmt); 2752. check_stmt_rc(rc, stmt); #364 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2937: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2936 is not freed after the last access at line 2937, column 3. 2935. /* Bind the buffers */ 2936. rc= mysql_stmt_bind_param(stmt, my_bind); 2937. check_stmt_rc(rc, stmt); ^ 2938. 2939. /* Specify the data */ #365 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2940: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 2938. 2939. /* Specify the data */ 2940. int_data= 10; /* integer */ ^ 2941. strcpy(str_data, "MySQL"); /* string */ 2942. #366 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2944: error: Dead Store(DEAD_STORE) The value written to `&is_null` is never used. 2942. 2943. /* INSERT SMALLINT data as NULL */ 2944. is_null= 1; ^ 2945. 2946. /* Execute the insert statement - 1*/ #367 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2955: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 2953. 2954. /* Re-execute the insert, by changing the values */ 2955. int_data= 1000; ^ 2956. strcpy(str_data, "The most popular open source database"); 2957. small_data= 1000; /* smallint */ #368 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:2957: error: Dead Store(DEAD_STORE) The value written to `&small_data` is never used. 2955. int_data= 1000; 2956. strcpy(str_data, "The most popular open source database"); 2957. small_data= 1000; /* smallint */ ^ 2958. is_null= 0; /* reset */ 2959. #369 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3365: error: Dead Store(DEAD_STORE) The value written to `&my_val` is never used. 3363. my_bind[0].length= &my_length; 3364. my_bind[0].is_null= &my_null; 3365. my_val= 1; ^ 3366. rc= mysql_stmt_bind_param(stmt, my_bind); 3367. check_stmt_rc(rc, stmt); #370 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3367: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 3366 is not freed after the last access at line 3367, column 3. 3365. my_val= 1; 3366. rc= mysql_stmt_bind_param(stmt, my_bind); 3367. check_stmt_rc(rc, stmt); ^ 3368. 3369. for (i= 0; i < 3; i++) #371 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3432: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 3432) and is dereferenced. 3430. 3431. // XPAND doesn't support DO command 3432. SKIP_XPAND; ^ 3433. 3434. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #372 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3432: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 3432) is dereferenced. 3430. 3431. // XPAND doesn't support DO command 3432. SKIP_XPAND; ^ 3433. 3434. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #373 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3477: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 3477) and is dereferenced. 3475. 3476. // https://jira.mariadb.org/browse/XPT-266 3477. if (IS_XPAND()) { ^ 3478. rc= mysql_query(mysql, "SET NAMES UTF8"); 3479. check_mysql_rc(rc, mysql); #374 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3477: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 3477) is dereferenced. 3475. 3476. // https://jira.mariadb.org/browse/XPT-266 3477. if (IS_XPAND()) { ^ 3478. rc= mysql_query(mysql, "SET NAMES UTF8"); 3479. check_mysql_rc(rc, mysql); #375 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3524: error: Dead Store(DEAD_STORE) The value written to `&double_data` is never used. 3522. strcpy(real_data, "10.2"); 3523. length[1]= (ulong)strlen(real_data); 3524. double_data= 34.5; ^ 3525. rc= mysql_stmt_bind_param(stmt, my_bind); 3526. check_stmt_rc(rc, stmt); #376 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3706: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 3705 is not freed after the last access at line 3706, column 3. 3704. 3705. rc= mysql_stmt_bind_param(stmt, my_bind); 3706. check_stmt_rc(rc, stmt); ^ 3707. 3708. rc= mysql_stmt_bind_result(stmt, my_bind); #377 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3711: error: Dead Store(DEAD_STORE) The value written to `&id` is never used. 3709. check_stmt_rc(rc, stmt); 3710. 3711. id= 10; ^ 3712. rc= mysql_stmt_execute(stmt); 3713. check_stmt_rc(rc, stmt); #378 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:3812: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 3811 is not freed after the last access at line 3812, column 5. 3810. 3811. rc= mysql_stmt_bind_param(stmt, my_bind); 3812. check_stmt_rc(rc, stmt); ^ 3813. 3814. rc= mysql_stmt_execute(stmt); #379 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4101: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4099. rc= mysql_real_query(mysql, SL(stmt_text)); 4100. check_mysql_rc(rc, mysql); 4101. rc= mysql_stmt_free_result(stmt); ^ 4102. rc= mysql_stmt_close(stmt); 4103. return OK; #380 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4102: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4100. check_mysql_rc(rc, mysql); 4101. rc= mysql_stmt_free_result(stmt); 4102. rc= mysql_stmt_close(stmt); ^ 4103. return OK; 4104. } #381 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4113: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 4111. int rc; 4112. char szData[25]; 4113. int nData= 1; ^ 4114. MYSQL_BIND my_bind[2]; 4115. ulong length[2]; #382 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4385: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 4379 is not freed after the last access at line 4385, column 3. 4383. while (mysql_fetch_row(result)) 4384. rc++; 4385. FAIL_UNLESS(rc == 2, "rowcount != 2"); ^ 4386. mysql_free_result(result); 4387. #383 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4451: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 4449. get_bind[0].length= &length; 4450. get_bind[0].buffer_length= (int)NAME_LEN; 4451. length= NAME_LEN; ^ 4452. 4453. get_bind[1].buffer_type= MYSQL_TYPE_LONG; #384 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4562: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 4561 is not freed after the last access at line 4562, column 3. 4560. 4561. rc= mysql_stmt_bind_param(stmt, my_bind); 4562. check_stmt_rc(rc, stmt); ^ 4563. 4564. strcpy(c1, "My"); strcpy(c2, "SQL"); #385 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4709: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4707. FAIL_IF(mysql_stmt_param_count(stmt2) != 1, "param_count != 1"); 4708. 4709. rc= mysql_stmt_close(stmt1); ^ 4710. 4711. /* #386 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4730: error: Dead Store(DEAD_STORE) The value written to `&count` is never used. 4728. my_bind[0].buffer= (void *)&count; 4729. my_bind[0].buffer_type= MYSQL_TYPE_LONG; 4730. count= 100; ^ 4731. 4732. rc= mysql_stmt_bind_param(stmt_x, my_bind); #387 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4733: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 4732 is not freed after the last access at line 4733, column 3. 4731. 4732. rc= mysql_stmt_bind_param(stmt_x, my_bind); 4733. check_stmt_rc(rc, stmt_x); ^ 4734. 4735. rc= mysql_stmt_execute(stmt_x); #388 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4835: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 4834 is not freed after the last access at line 4835, column 3. 4833. bind[0].buffer_type= MYSQL_TYPE_STRING; 4834. rc= mysql_stmt_bind_param(stmt, bind); 4835. check_stmt_rc(rc, stmt); ^ 4836. rc= mysql_stmt_send_long_data(stmt, 0, data, 6); 4837. check_stmt_rc(rc, stmt); #389 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4867: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4865. 4866. stmt= mysql_stmt_init(mysql); 4867. rc= mysql_stmt_prepare(stmt, SL(query)); ^ 4868. 4869. memset(bind, 0, sizeof(MYSQL_BIND)); #390 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4875: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 4874 is not freed after the last access at line 4875, column 3. 4873. bind[0].buffer_type= MYSQL_TYPE_STRING; 4874. rc= mysql_stmt_bind_param(stmt, bind); 4875. check_stmt_rc(rc, stmt); ^ 4876. rc= mysql_stmt_execute(stmt); 4877. check_stmt_rc(rc, stmt); #391 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:4949: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4947. check_stmt_rc(rc, stmt); 4948. 4949. rc= mysql_query(mysql, "DROP TABLE t1"); ^ 4950. 4951. return OK; #392 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:5156: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5154. enum mysql_stmt_state state; 5155. 5156. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5157. FAIL_IF(state != MYSQL_STMT_INITTED, "expected status MYSQL_STMT_INITTED"); 5158. #393 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:5156: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 5152) and is dereferenced in the call to `mysql_stmt_attr_get()`. 5154. enum mysql_stmt_state state; 5155. 5156. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5157. FAIL_IF(state != MYSQL_STMT_INITTED, "expected status MYSQL_STMT_INITTED"); 5158. #394 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:5162: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5160. check_stmt_rc(rc, stmt); 5161. 5162. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5163. FAIL_IF(state != MYSQL_STMT_PREPARED, "expected status MYSQL_STMT_PREPARED"); 5164. #395 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:5168: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5166. check_stmt_rc(rc, stmt); 5167. 5168. rc= mysql_stmt_attr_get(stmt, STMT_ATTR_STATE, &state); ^ 5169. FAIL_IF(state != MYSQL_STMT_EXECUTED, "expected status MYSQL_STMT_EXECUTED"); 5170. #396 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps.c:5203: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5201. fields_binary= mariadb_stmt_fetch_fields(stmt); 5202. 5203. rc= mysql_query(mysql, "SELECT a,b,c,d,e,f FROM t1"); ^ 5204. result= mysql_store_result(mysql); 5205. fields_text= mysql_fetch_fields(result); #397 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:53: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 53) is dereferenced. 51. 52. // https://jira.mariadb.org/browse/XPT-266 53. if (IS_XPAND()) { ^ 54. rc= mysql_query(mysql, "SET NAMES UTF8"); 55. check_mysql_rc(rc, mysql); #398 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:177: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 176 is not freed after the last access at line 177, column 3. 175. 176. rc= mysql_stmt_bind_param(stmt, my_bind); 177. check_stmt_rc(rc, stmt); ^ 178. 179. rc= mysql_stmt_execute(stmt); #399 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:243: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 243) and is dereferenced. 241. 242. // https://jira.mariadb.org/browse/XPT-266 243. if (IS_XPAND()) { ^ 244. rc= mysql_query(mysql, "SET NAMES UTF8"); 245. check_mysql_rc(rc, mysql); #400 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:243: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 243) is dereferenced. 241. 242. // https://jira.mariadb.org/browse/XPT-266 243. if (IS_XPAND()) { ^ 244. rc= mysql_query(mysql, "SET NAMES UTF8"); 245. check_mysql_rc(rc, mysql); #401 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:276: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 275 is not freed after the last access at line 276, column 3. 274. 275. rc= mysql_stmt_bind_param(stmt, my_bind); 276. check_stmt_rc(rc, stmt); ^ 277. 278. rc= mysql_stmt_execute(stmt); #402 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:392: error: Dead Store(DEAD_STORE) The value written to `&num` is never used. 390. 391. isnull= 0; 392. num= 88; ^ 393. for (i= 0 ; i < 4 ; i++) 394. my_bind[i].is_null= &isnull; #403 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:538: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 538) is dereferenced. 536. int rc; 537. 538. SKIP_MAXSCALE; ^ 539. 540. stmt = mysql_stmt_init(mysql); #404 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:538: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 538) is dereferenced. 536. int rc; 537. 538. SKIP_MAXSCALE; ^ 539. 540. stmt = mysql_stmt_init(mysql); #405 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:553: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 551. rc= mysql_options(mysql, MYSQL_OPT_RECONNECT, "1"); 552. check_mysql_rc(rc, mysql); 553. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 554. 555. rc= mysql_ping(mysql); #406 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:574: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 574) is dereferenced. 572. 573. // XPAND doesn't support AGAINST 574. SKIP_XPAND ^ 575. 576. rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bg1500"); #407 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:709: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 707. check_stmt_rc(rc, stmt); 708. 709. rc= mysql_stmt_fetch(stmt); ^ 710. FAIL_UNLESS(mysql_warning_count(mysql), "Warning expected"); 711. #408 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:786: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 786) and is dereferenced. 784. 785. //https://jira.mariadb.org/browse/XPT-273 786. SKIP_XPAND; ^ 787. 788. /* I. Prepare the table */ #409 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:786: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 786) is dereferenced. 784. 785. //https://jira.mariadb.org/browse/XPT-273 786. SKIP_XPAND; ^ 787. 788. /* I. Prepare the table */ #410 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:806: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 804. /* II. Check SELECT metadata */ 805. stmt_text= ("select t, tt, mt, lt, vl, vb, vu from t1"); 806. rc= mysql_stmt_prepare(stmt, SL(stmt_text)); ^ 807. metadata= mysql_stmt_result_metadata(stmt); 808. field= mysql_fetch_fields(metadata); #411 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:837: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 836) and is dereferenced in the call to `mysql_stmt_attr_set()`. 835. /* Check that attr_get returns correct data on little and big endian CPUs */ 836. stmt= mysql_stmt_init(mysql); 837. mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); ^ 838. mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); 839. FAIL_UNLESS(flag == flag_orig, "flag != flag_orig"); #412 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:838: error: Null Dereference(NULLPTR_DEREFERENCE) `stmt` could be null (from the call to `mysql_stmt_init()` on line 836) and is dereferenced in the call to `mysql_stmt_attr_get()`. 836. stmt= mysql_stmt_init(mysql); 837. mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (const void*) &flag); 838. mysql_stmt_attr_get(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &flag); ^ 839. FAIL_UNLESS(flag == flag_orig, "flag != flag_orig"); 840. #413 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:860: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 860) and is dereferenced. 858. 859. // https://jira.mariadb.org/browse/XPT-266 860. if (IS_XPAND()) { ^ 861. rc= mysql_query(mysql, "SET NAMES UTF8"); 862. check_mysql_rc(rc, mysql); #414 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:860: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 860) is dereferenced. 858. 859. // https://jira.mariadb.org/browse/XPT-266 860. if (IS_XPAND()) { ^ 861. rc= mysql_query(mysql, "SET NAMES UTF8"); 862. check_mysql_rc(rc, mysql); #415 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:887: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 886 is not freed after the last access at line 887, column 5. 885. 886. rc= mysql_stmt_bind_param(stmt, my_bind); 887. check_stmt_rc(rc, stmt); ^ 888. 889. int_data= 1; #416 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:889: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 887. check_stmt_rc(rc, stmt); 888. 889. int_data= 1; ^ 890. 891. /* #417 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:931: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 929. */ 930. 931. int_data= 2; ^ 932. /* execute */ 933. rc= mysql_stmt_execute(stmt); #418 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1000: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 998. error: 999. mysql_stmt_close(stmt); 1000. rc= mysql_query(mysql, "DROP TABLE test_long_data"); ^ 1001. return FAIL; 1002. } #419 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1143: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1142 is not freed after the last access at line 1143, column 3. 1141. check_stmt_rc(rc, stmt); 1142. rc= mysql_stmt_bind_param(stmt, my_bind); 1143. check_stmt_rc(rc, stmt); ^ 1144. rc= mysql_stmt_execute(stmt); 1145. check_stmt_rc(rc, stmt); #420 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1399: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1398 is not freed after the last access at line 1399, column 5. 1397. 1398. rc= mysql_stmt_bind_param(stmt, bind); 1399. check_stmt_rc(rc, stmt); ^ 1400. rc= mysql_stmt_execute(stmt); 1401. check_stmt_rc(rc, stmt); #421 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1549: error: Dead Store(DEAD_STORE) The value written to `&int8_val` is never used. 1547. mysql_stmt_bind_param(stmt, bind_array); 1548. 1549. int8_val= int8_min; ^ 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; #422 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1550: error: Dead Store(DEAD_STORE) The value written to `&uint8_val` is never used. 1548. 1549. int8_val= int8_min; 1550. uint8_val= uint8_min; ^ 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; #423 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1551: error: Dead Store(DEAD_STORE) The value written to `&int16_val` is never used. 1549. int8_val= int8_min; 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; ^ 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; #424 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1552: error: Dead Store(DEAD_STORE) The value written to `&uint16_val` is never used. 1550. uint8_val= uint8_min; 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; ^ 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; #425 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1553: error: Dead Store(DEAD_STORE) The value written to `&int32_val` is never used. 1551. int16_val= int16_min; 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; ^ 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; #426 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1554: error: Dead Store(DEAD_STORE) The value written to `&uint32_val` is never used. 1552. uint16_val= uint16_min; 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; ^ 1555. int64_val= int64_min; 1556. uint64_val= uint64_min; #427 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1555: error: Dead Store(DEAD_STORE) The value written to `&int64_val` is never used. 1553. int32_val= int32_min; 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; ^ 1556. uint64_val= uint64_min; 1557. #428 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1556: error: Dead Store(DEAD_STORE) The value written to `&uint64_val` is never used. 1554. uint32_val= uint32_min; 1555. int64_val= int64_min; 1556. uint64_val= uint64_min; ^ 1557. 1558. rc= mysql_stmt_execute(stmt); #429 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1655: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 1655) and is dereferenced. 1653. 1654. // https://jira.mariadb.org/browse/XPT-266 1655. if (IS_XPAND()) { ^ 1656. rc= mysql_query(mysql, "SET NAMES UTF8"); 1657. check_mysql_rc(rc, mysql); #430 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1655: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 1655) is dereferenced. 1653. 1654. // https://jira.mariadb.org/browse/XPT-266 1655. if (IS_XPAND()) { ^ 1656. rc= mysql_query(mysql, "SET NAMES UTF8"); 1657. check_mysql_rc(rc, mysql); #431 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1691: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1690 is not freed after the last access at line 1691, column 3. 1689. 1690. rc= mysql_stmt_bind_param(stmt, my_bind); 1691. check_stmt_rc(rc, stmt); ^ 1692. int_data= 1; 1693. strcpy(str_data, "hh"); #432 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1692: error: Dead Store(DEAD_STORE) The value written to `&int_data` is never used. 1690. rc= mysql_stmt_bind_param(stmt, my_bind); 1691. check_stmt_rc(rc, stmt); 1692. int_data= 1; ^ 1693. strcpy(str_data, "hh"); 1694. str_length= (unsigned long)strlen(str_data); #433 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1694: error: Dead Store(DEAD_STORE) The value written to `&str_length` is never used. 1692. int_data= 1; 1693. strcpy(str_data, "hh"); 1694. str_length= (unsigned long)strlen(str_data); ^ 1695. 1696. rc= mysql_stmt_execute(stmt); #434 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1730: error: Dead Store(DEAD_STORE) The value written to `&cur_query` is never used. 1728. NULL 1729. }; 1730. const char **cur_query= queries; ^ 1731. 1732. #435 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1749: error: Dead Store(DEAD_STORE) The value written to `&in_is_null` is never used. 1747. in_bind.length= 0; 1748. in_bind.buffer= (void *)&in_long; 1749. in_is_null= 1; ^ 1750. in_long= 1; 1751. #436 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1750: error: Dead Store(DEAD_STORE) The value written to `&in_long` is never used. 1748. in_bind.buffer= (void *)&in_long; 1749. in_is_null= 1; 1750. in_long= 1; ^ 1751. 1752. out_bind.buffer_type= MYSQL_TYPE_STRING; #437 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:1771: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 1770 is not freed after the last access at line 1771, column 5. 1769. 1770. rc= mysql_stmt_bind_param(stmt, &in_bind); 1771. check_stmt_rc(rc, stmt); ^ 1772. rc= mysql_stmt_bind_result(stmt, &out_bind); 1773. check_stmt_rc(rc, stmt); #438 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2102: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2102) is dereferenced. 2100. int rc, warning_count= 0; 2101. MYSQL_STMT *stmt; 2102. SKIP_MAXSCALE; ^ 2103. SKIP_MYSQL(mysql); // don't send expected warnings 2104. #439 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2102: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2102) is dereferenced. 2100. int rc, warning_count= 0; 2101. MYSQL_STMT *stmt; 2102. SKIP_MAXSCALE; ^ 2103. SKIP_MYSQL(mysql); // don't send expected warnings 2104. #440 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2273: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2269 is not freed after the last access at line 2273, column 3. 2271. /* Execute the select statement */ 2272. rc= mysql_stmt_execute(stmt); 2273. check_stmt_rc(rc, stmt); ^ 2274. my_bind[0].buffer= (void *) &time_out; 2275. my_bind[1].buffer= (void *) &datetime_out; #441 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2489: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2474 is not freed after the last access at line 2489, column 3. 2487. 2488. rc= mysql_stmt_execute(stmt); 2489. check_stmt_rc(rc, stmt); ^ 2490. rc= mysql_stmt_fetch(stmt); 2491. #442 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2628: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2628) is dereferenced. 2626. int nrows, i; 2627. 2628. SKIP_MAXSCALE; ^ 2629. 2630. stmt_text= "drop table if exists t1"; #443 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2628: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2628) is dereferenced. 2626. int nrows, i; 2627. 2628. SKIP_MAXSCALE; ^ 2629. 2630. stmt_text= "drop table if exists t1"; #444 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2631: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2629. 2630. stmt_text= "drop table if exists t1"; 2631. rc= mysql_real_query(mysql, SL(stmt_text)); ^ 2632. 2633. stmt_text= "create table if not exists t1" #445 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2744: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2742. rc= mysql_stmt_execute(stmt); 2743. check_stmt_rc(rc, stmt); 2744. rc= mysql_stmt_reset(stmt); ^ 2745. } 2746. #446 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2763: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 2763) and is dereferenced. 2761. const char *stmt_text; 2762. int rc; 2763. SKIP_MAXSCALE; ^ 2764. 2765. if (!is_mariadb) #447 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2763: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2763) is dereferenced. 2761. const char *stmt_text; 2762. int rc; 2763. SKIP_MAXSCALE; ^ 2764. 2765. if (!is_mariadb) #448 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2763: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 2763) and is dereferenced. 2761. const char *stmt_text; 2762. int rc; 2763. SKIP_MAXSCALE; ^ 2764. 2765. if (!is_mariadb) #449 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2763: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 2763) is dereferenced. 2761. const char *stmt_text; 2762. int rc; 2763. SKIP_MAXSCALE; ^ 2764. 2765. if (!is_mariadb) #450 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2822: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 2820. rc= mysql_stmt_store_result(*stmt); 2821. check_stmt_rc(rc, *stmt); 2822. rc= mysql_stmt_fetch(*stmt); ^ 2823. FAIL_UNLESS((int32) (stmt - stmt_list) == no, ""); 2824. } #451 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2837: error: Dead Store(DEAD_STORE) The value written to `&b` is never used. 2835. const char *stmt_text; 2836. int rc; 2837. short b= 1; ^ 2838. MYSQL_BIND my_bind[1]; 2839. #452 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:2865: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 2862 is not freed after the last access at line 2865, column 3. 2863. 2864. rc= mysql_stmt_execute(stmt); 2865. check_stmt_rc(rc, stmt); ^ 2866. mysql_stmt_store_result(stmt); 2867. #453 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3139: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 3133 is not freed after the last access at line 3139, column 3. 3137. while (mysql_fetch_row(result)) 3138. rc++; 3139. FAIL_UNLESS(rc == 1, "rowcount != 1"); ^ 3140. 3141. verify_prepare_field(result, 0, #454 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3376: error: Dead Store(DEAD_STORE) The value written to `&stmt_text` is never used. 3374. check_stmt_rc(rc, stmt); 3375. mysql_stmt_close(stmt); 3376. stmt_text= "drop table if exists t1, v1"; ^ 3377. rc= mysql_query(mysql, "DROP TABLE t1"); 3378. check_mysql_rc(rc, mysql); #455 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3424: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 3423 is not freed after the last access at line 3424, column 3. 3422. is_null= 0; 3423. rc= mysql_stmt_bind_param(stmt, my_bind); 3424. check_stmt_rc(rc, stmt); ^ 3425. 3426. strcpy(data, "8.0"); #456 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3458: error: Dead Store(DEAD_STORE) The value written to `&is_null` is never used. 3456. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 3457. 3458. is_null= 1; ^ 3459. rc= mysql_stmt_execute(stmt); 3460. check_stmt_rc(rc, stmt); #457 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3822: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 3822) and is dereferenced. 3820. int i; 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; ^ 3823. SKIP_XPAND; 3824. #458 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3822: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 3822) is dereferenced. 3820. int i; 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; ^ 3823. SKIP_XPAND; 3824. #459 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3822: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 3822) and is dereferenced. 3820. int i; 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; ^ 3823. SKIP_XPAND; 3824. #460 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3822: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 3822) is dereferenced. 3820. int i; 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; ^ 3823. SKIP_XPAND; 3824. #461 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3823: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 3823) and is dereferenced. 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; 3823. SKIP_XPAND; ^ 3824. 3825. rc= mysql_options(mysql, MYSQL_OPT_RECONNECT, "1"); #462 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3823: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 3823) is dereferenced. 3821. const char *query= "INSERT INTO bug53311 VALUES (1)"; 3822. SKIP_MAXSCALE; 3823. SKIP_XPAND; ^ 3824. 3825. rc= mysql_options(mysql, MYSQL_OPT_RECONNECT, "1"); #463 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:3845: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 3843. 3844. /* kill connection */ 3845. rc= mysql_kill(mysql, mysql_thread_id(mysql)); ^ 3846. 3847. rc= mysql_stmt_execute(stmt); #464 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4147: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 4147) is dereferenced. 4145. 4146. //https://jira.mariadb.org/browse/XPT-273 4147. SKIP_XPAND; ^ 4148. 4149. rc= mysql_query(mysql, "DROP TABLE IF EXISTS conc168"); #465 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4246: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 4246) and is dereferenced. 4244. 4245. // https://jira.mariadb.org/browse/XPT-286 4246. SKIP_XPAND ^ 4247. 4248. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #466 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4246: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 4246) is dereferenced. 4244. 4245. // https://jira.mariadb.org/browse/XPT-286 4246. SKIP_XPAND ^ 4247. 4248. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #467 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4273: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4271. check_stmt_rc(rc, stmt); 4272. 4273. rc= mysql_stmt_fetch(stmt); ^ 4274. mysql_stmt_close(stmt); 4275. #468 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4306: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4304. check_stmt_rc(rc, stmt); 4305. 4306. rc= mysql_stmt_fetch(stmt); ^ 4307. mysql_stmt_close(stmt); 4308. #469 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4363: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4361. check_stmt_rc(rc, stmt); 4362. 4363. rc= mysql_query(mysql, "SELECT row_count()"); ^ 4364. result= mysql_store_result(mysql); 4365. row= mysql_fetch_row(result); #470 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4373: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4371. rc= mysql_stmt_prepare(stmt, "SELECT row_count()", -1); 4372. check_stmt_rc(rc, stmt); 4373. rc= mysql_stmt_execute(stmt); ^ 4374. 4375. memset(bind, 0, 2 * sizeof(MYSQL_BIND)); #471 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4380: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4378. bind[0].buffer_type= bind[1].buffer_type= MYSQL_TYPE_STRING; 4379. 4380. rc= mysql_stmt_bind_result(stmt, bind); ^ 4381. 4382. while(!mysql_stmt_fetch(stmt)) #472 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4384: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4382. while(!mysql_stmt_fetch(stmt)) 4383. diag("b1: %s", buf1); 4384. rc= mysql_stmt_close(stmt); ^ 4385. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 4386. check_mysql_rc(rc, mysql); #473 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4423: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4421. diag("rc=%d err=%d float=%f, %d", rc, err, f, MYSQL_DATA_TRUNCATED); 4422. 4423. rc= mysql_stmt_close(stmt); ^ 4424. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); 4425. check_mysql_rc(rc, mysql); #474 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4492: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4490. FAIL_UNLESS(num_rows == 9, "num_rows != 9"); 4491. 4492. rc= mysql_stmt_close(stmt1); ^ 4493. rc= mysql_stmt_close(stmt2); 4494. FAIL_UNLESS(rc == 0, ""); #475 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4588: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 4588) is dereferenced. 4586. int rc; 4587. 4588. SKIP_MAXSCALE; ^ 4589. rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM nonexisting_table", -1); 4590. FAIL_IF(rc==0, "Expected error\n"); #476 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4588: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 4588) is dereferenced. 4586. int rc; 4587. 4588. SKIP_MAXSCALE; ^ 4589. rc= mariadb_stmt_execute_direct(stmt, "SELECT 1 FROM nonexisting_table", -1); 4590. FAIL_IF(rc==0, "Expected error\n"); #477 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4615: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4613. check_stmt_rc(rc, stmt); 4614. 4615. rc= mysql_stmt_bind_result(stmt, &bind); ^ 4616. 4617. while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA) #478 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4636: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4634. char buf1[52]; 4635. 4636. rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &val); ^ 4637. 4638. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); #479 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4638: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4636. rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, &val); 4637. 4638. rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); ^ 4639. rc= mysql_query(mysql, "CREATE TABLE t1 (i INT(20) ZEROFILL)"); 4640. check_mysql_rc(rc, mysql); #480 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4735: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4733. rc= mysql_stmt_execute(stmt); 4734. check_stmt_rc(rc, stmt); 4735. rc= mysql_stmt_store_result(stmt); ^ 4736. 4737. memset(bind, 0, sizeof(MYSQL_BIND)); #481 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4910: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4908. rc= mysql_stmt_execute(stmt); 4909. check_stmt_rc(rc, stmt); 4910. rc= mysql_stmt_store_result(stmt); ^ 4911. 4912. memset(bind, 0, sizeof(MYSQL_BIND)); #482 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:4991: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 4989. rc= mysql_stmt_execute(stmt); 4990. check_stmt_rc(rc, stmt); 4991. rc= mysql_stmt_fetch(stmt); ^ 4992. diag("num_rows: %lld", mysql_stmt_num_rows(stmt)); 4993. FAIL_IF(mysql_stmt_num_rows(stmt) != 1, "expected 1 row"); #483 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5081: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5079. bind.buffer_length= 1; 5080. 5081. rc= mysql_stmt_bind_result(stmt, &bind); ^ 5082. 5083. rc= mysql_stmt_fetch(stmt); #484 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5345: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5343. float f; 5344. 5345. rc= mysql_query(mysql, "drop table if exists t1"); ^ 5346. 5347. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); #485 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5347: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5345. rc= mysql_query(mysql, "drop table if exists t1"); 5346. 5347. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); ^ 5348. 5349. rc= mysql_real_query(mysql, SL("INSERT INTO t1 VALUES (1073741825)")); #486 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5349: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5347. rc= mysql_real_query(mysql, SL("CREATE TABLE t1 (a int)")); 5348. 5349. rc= mysql_real_query(mysql, SL("INSERT INTO t1 VALUES (1073741825)")); ^ 5350. 5351. stmt= mysql_stmt_init(mysql); #487 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5478: error: Dead Store(DEAD_STORE) The value written to `¶mCount` is never used. 5476. int rc; 5477. MYSQL_BIND bind[MDEV19838_MAX_PARAM_COUNT]; 5478. unsigned int i, paramCount = 1; ^ 5479. char charvalue[] = "012345678901234567890123456789012345"; 5480. MYSQL_STMT *stmt; #488 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5482: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 5482) and is dereferenced. 5480. MYSQL_STMT *stmt; 5481. 5482. SKIP_MAXSCALE; ^ 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { #489 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5482: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 5482) is dereferenced. 5480. MYSQL_STMT *stmt; 5481. 5482. SKIP_MAXSCALE; ^ 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { #490 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5482: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 5482) and is dereferenced. 5480. MYSQL_STMT *stmt; 5481. 5482. SKIP_MAXSCALE; ^ 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { #491 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5482: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 5482) is dereferenced. 5480. MYSQL_STMT *stmt; 5481. 5482. SKIP_MAXSCALE; ^ 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { #492 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5484: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 5484) and is dereferenced. 5482. SKIP_MAXSCALE; 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { ^ 5485. rc= mysql_query(mysql, "SET NAMES UTF8"); 5486. check_mysql_rc(rc, mysql); #493 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5484: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 5484) is dereferenced. 5482. SKIP_MAXSCALE; 5483. // https://jira.mariadb.org/browse/XPT-266 5484. if (IS_XPAND()) { ^ 5485. rc= mysql_query(mysql, "SET NAMES UTF8"); 5486. check_mysql_rc(rc, mysql); #494 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5576: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5574. mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶mCount); 5575. 5576. rc = mysql_stmt_bind_param(stmt, bind); ^ 5577. 5578. rc = mariadb_stmt_execute_direct(stmt, "INSERT INTO mdev19838" #495 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5633: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5631. MYSQL_STMT *stmt= mysql_stmt_init(mysql); 5632. 5633. rc= mysql_query(mysql, "CREATE TEMPORARY TABLE t1 (a int)"); ^ 5634. 5635. rc= mysql_stmt_attr_set(stmt, STMT_ATTR_CB_USER_DATA, mysql); #496 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5650: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 5649 is not freed after the last access at line 5650, column 3. 5648. bind.buffer_type= MYSQL_TYPE_LONG; 5649. rc= mysql_stmt_bind_param(stmt, &bind); 5650. check_stmt_rc(rc, stmt); ^ 5651. 5652. rc= mysql_stmt_prepare(stmt, SL("INSERT INTO t1 VALUES (?)")); #497 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5731: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5729. check_mysql_rc(rc, mysql); 5730. 5731. rc= mysql_query(mysql, "SET @@lock_wait_timeout=3"); ^ 5732. 5733. rc= mysql_query(my, "LOCK TABLES conc633 WRITE"); #498 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5916: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5914. check_stmt_rc(rc, stmt); 5915. 5916. rc= mysql_stmt_execute(stmt); ^ 5917. 5918. memset(&bind, 0, sizeof(MYSQL_BIND)); #499 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5927: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5925. check_stmt_rc(rc, stmt); 5926. 5927. rc= mysql_stmt_fetch(stmt); ^ 5928. 5929. diag("Buffer: %s", buffer); #500 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5932: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5930. FAIL_IF(strlen(buffer) == 1, "Expected zerofilled string"); 5931. 5932. rc= mysql_stmt_close(stmt); ^ 5933. 5934. rc= mysql_query(mysql, "DROP TABLE t1"); #501 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_bugs.c:5964: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 5962. check_stmt_rc(rc, stmt); 5963. 5964. rc= mysql_stmt_bind_result(stmt, bind); ^ 5965. 5966. mysql_stmt_fetch(stmt); #502 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:35: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 35) and is dereferenced. 33. 34. //https://jira.mariadb.org/browse/XPT-268 35. SKIP_XPAND; ^ 36. 37. /* set up stored procedure */ #503 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:35: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 35) is dereferenced. 33. 34. //https://jira.mariadb.org/browse/XPT-268 35. SKIP_XPAND; ^ 36. 37. /* set up stored procedure */ #504 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:113: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 111. rc= mysql_stmt_next_result(stmt); 112. check_stmt_rc(rc, stmt); 113. rc= mysql_stmt_bind_result(stmt, rs_bind); ^ 114. 115. rc= mysql_stmt_fetch(stmt); #505 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:115: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 113. rc= mysql_stmt_bind_result(stmt, rs_bind); 114. 115. rc= mysql_stmt_fetch(stmt); ^ 116. FAIL_IF(mysql_stmt_field_count(stmt) != 3, "expected 3 fields"); 117. FAIL_IF(int_data[0] != 100 || int_data[1] != 200 || int_data[2] != 300, #506 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:121: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 119. 120. FAIL_IF(mysql_stmt_next_result(stmt) != 0, "expected more results"); 121. rc= mysql_stmt_bind_result(stmt, rs_bind); ^ 122. 123. rc= mysql_stmt_fetch(stmt); #507 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:123: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 121. rc= mysql_stmt_bind_result(stmt, rs_bind); 122. 123. rc= mysql_stmt_fetch(stmt); ^ 124. FAIL_IF(mysql_stmt_field_count(stmt) != 2, "expected 2 fields"); 125. FAIL_IF(int_data[0] != 200 || int_data[1] != 300, #508 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:131: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 129. FAIL_IF(mysql_stmt_field_count(stmt) != 0, "expected 0 fields"); 130. 131. rc= mysql_stmt_close(stmt); ^ 132. rc = mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); 133. check_mysql_rc(rc, mysql); #509 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:147: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 147) is dereferenced. 145. 146. //https://jira.mariadb.org/browse/XPT-268 147. SKIP_XPAND; ^ 148. 149. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #510 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:220: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 218. } while (mysql_stmt_next_result(stmt) == 0); 219. 220. rc= mysql_stmt_close(stmt); ^ 221. return OK; 222. } #511 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:233: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 233) is dereferenced. 231. 232. //https://jira.mariadb.org/browse/XPT-268 233. SKIP_XPAND; ^ 234. 235. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #512 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:277: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 275. check_mysql_rc(rc, mysql); 276. 277. rc= mysql_stmt_close(stmt); ^ 278. return OK; 279. } #513 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:291: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 291) and is dereferenced. 289. 290. // https://jira.mariadb.org/browse/XPT-268 291. SKIP_XPAND; ^ 292. 293. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #514 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:291: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 291) is dereferenced. 289. 290. // https://jira.mariadb.org/browse/XPT-268 291. SKIP_XPAND; ^ 292. 293. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #515 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:318: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 315 is not freed after the last access at line 318, column 3. 316. 317. rc= mysql_stmt_execute(stmt); 318. check_stmt_rc(rc, stmt); ^ 319. 320. rc= mysql_stmt_store_result(stmt); #516 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:425: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 423. } 424. 425. rc= mysql_stmt_close(stmt); ^ 426. 427. #517 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:447: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 447) and is dereferenced. 445. 446. // https://jira.mariadb.org/browse/XPT-268 447. SKIP_XPAND; ^ 448. 449. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #518 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:447: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 447) is dereferenced. 445. 446. // https://jira.mariadb.org/browse/XPT-268 447. SKIP_XPAND; ^ 448. 449. rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); #519 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/ps_new.c:476: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 473 is not freed after the last access at line 476, column 5. 474. 475. rc= mysql_stmt_execute(stmt); 476. check_stmt_rc(rc, stmt); ^ 477. do { 478. if (stmt->field_count) #520 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:44: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 39 is not freed after the last access at line 44, column 3. 42. /* since we use store result, we should be able execute other api calls */ 43. rc= mysql_ping(mysql); 44. FAIL_IF(rc, "mysql_ping failed"); ^ 45. 46. while (mysql_fetch_row(result)) #521 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:49: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 39 is not freed after the last access at line 49, column 3. 47. rowcount++; 48. 49. FAIL_IF(rowcount != 2, "rowcount != 2"); ^ 50. 51. mysql_free_result(result); #522 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:71: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 65 is not freed after the last access at line 71, column 3. 69. able to execute other api calls */ 70. rc= mysql_ping(mysql); 71. FAIL_IF(!rc, "Error expected"); ^ 72. 73. while (mysql_fetch_row(result)) #523 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:76: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 65 is not freed after the last access at line 76, column 3. 74. rowcount++; 75. 76. FAIL_IF(rowcount != 2, "rowcount != 2"); ^ 77. 78. mysql_free_result(result); #524 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:317: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 315. FAIL_UNLESS(length1 == 5, "length1 != 5"); 316. 317. length= 99; ^ 318. rc= mysql_stmt_fetch(stmt); 319. check_stmt_rc(rc, stmt); #525 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:348: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 346. FAIL_UNLESS(length1 == 5, "length1 != 5"); 347. 348. length= 99; ^ 349. rc= mysql_stmt_fetch(stmt); 350. check_stmt_rc(rc, stmt); #526 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:471: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 469. check_stmt_rc(rc, stmt); 470. 471. nData= 10; length= 0; ^ 472. rc= mysql_stmt_execute(stmt); 473. check_stmt_rc(rc, stmt); #527 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:487: error: Dead Store(DEAD_STORE) The value written to `&nData` is never used. 485. FAIL_UNLESS(rc == MYSQL_NO_DATA, "rc != MYSQL_NO_DATA"); 486. 487. nData= 20; ^ 488. rc= mysql_stmt_execute(stmt); 489. check_stmt_rc(rc, stmt); #528 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:661: error: Null Dereference(NULLPTR_DEREFERENCE) `mysql_default` could be null (null value originating from line 661) and is dereferenced. 659. 660. // https://jira.mariadb.org/browse/XPT-287 661. SKIP_XPAND; ^ 662. 663. rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_flags"); #529 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:661: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 661) is dereferenced. 659. 660. // https://jira.mariadb.org/browse/XPT-287 661. SKIP_XPAND; ^ 662. 663. rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_flags"); #530 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:685: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_use_result()` on line 679 is not freed after the last access at line 685, column 3. 683. 684. field= mysql_fetch_field(result); 685. FAIL_UNLESS(field->flags & NOT_NULL_FLAG && ^ 686. field->flags & PRI_KEY_FLAG && 687. field->flags & AUTO_INCREMENT_FLAG, "Wrong flags for field 0"); #531 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:821: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 817 is not freed after the last access at line 821, column 3. 819. 820. field= mysql_fetch_field(result); 821. FAIL_IF(!field, "Invalid field"); ^ 822. FAIL_UNLESS(strcmp(field->name, "YEAR") == 0, "name != 'YEAR'"); 823. FAIL_UNLESS(field->org_name[0] == '\0', "org_name != ''"); #532 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:822: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 817 is not freed after the last access at line 822, column 3. 820. field= mysql_fetch_field(result); 821. FAIL_IF(!field, "Invalid field"); 822. FAIL_UNLESS(strcmp(field->name, "YEAR") == 0, "name != 'YEAR'"); ^ 823. FAIL_UNLESS(field->org_name[0] == '\0', "org_name != ''"); 824. #533 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:823: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 817 is not freed after the last access at line 823, column 3. 821. FAIL_IF(!field, "Invalid field"); 822. FAIL_UNLESS(strcmp(field->name, "YEAR") == 0, "name != 'YEAR'"); 823. FAIL_UNLESS(field->org_name[0] == '\0', "org_name != ''"); ^ 824. 825. field= mysql_fetch_field(result); #534 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:826: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 817 is not freed after the last access at line 826, column 3. 824. 825. field= mysql_fetch_field(result); 826. FAIL_IF(field, "no more fields expected"); ^ 827. 828. mysql_free_result(result); #535 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:903: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 901. error: 902. mysql_free_result(res); 903. rc= mysql_query(mysql, "drop table t1"); ^ 904. return FAIL; 905. } #536 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:957: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 957) is dereferenced. 955. 956. SKIP_SKYSQL; 957. SKIP_MAXSCALE; ^ 958. 959. /* #537 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/result.c:957: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 957) is dereferenced. 955. 956. SKIP_SKYSQL; 957. SKIP_MAXSCALE; ^ 958. 959. /* #538 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:40: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 33 is not freed after the last access at line 40, column 3. 38. int events= 0, rc; 39. 40. SKIP_SKYSQL; ^ 41. SKIP_MAXSCALE; 42. #539 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:41: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 33 is not freed after the last access at line 41, column 3. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. 43. if (!is_mariadb) #540 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:41: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 33 is not freed after the last access at line 41, column 3. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. 43. if (!is_mariadb) #541 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:41: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 33 is not freed after the last access at line 41, column 3. 39. 40. SKIP_SKYSQL; 41. SKIP_MAXSCALE; ^ 42. 43. if (!is_mariadb) #542 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:43: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 33 is not freed after the last access at line 43, column 8. 41. SKIP_MAXSCALE; 42. 43. if (!is_mariadb) ^ 44. return SKIP; 45. #543 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:107: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 100 is not freed after the last access at line 107, column 3. 105. int events= 0, rc; 106. 107. SKIP_SKYSQL; ^ 108. SKIP_MAXSCALE; 109. #544 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:108: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 100 is not freed after the last access at line 108, column 3. 106. 107. SKIP_SKYSQL; 108. SKIP_MAXSCALE; ^ 109. 110. if (!is_mariadb) #545 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:108: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 100 is not freed after the last access at line 108, column 3. 106. 107. SKIP_SKYSQL; 108. SKIP_MAXSCALE; ^ 109. 110. if (!is_mariadb) #546 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:108: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 100 is not freed after the last access at line 108, column 3. 106. 107. SKIP_SKYSQL; 108. SKIP_MAXSCALE; ^ 109. 110. if (!is_mariadb) #547 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:110: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 100 is not freed after the last access at line 110, column 8. 108. SKIP_MAXSCALE; 109. 110. if (!is_mariadb) ^ 111. return SKIP; 112. #548 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:186: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 179 is not freed after the last access at line 186, column 3. 184. int rc; 185. 186. SKIP_SKYSQL; ^ 187. SKIP_MAXSCALE; 188. #549 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:187: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 179 is not freed after the last access at line 187, column 3. 185. 186. SKIP_SKYSQL; 187. SKIP_MAXSCALE; ^ 188. 189. if (!is_mariadb) #550 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:187: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 179 is not freed after the last access at line 187, column 3. 185. 186. SKIP_SKYSQL; 187. SKIP_MAXSCALE; ^ 188. 189. if (!is_mariadb) #551 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:187: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 179 is not freed after the last access at line 187, column 3. 185. 186. SKIP_SKYSQL; 187. SKIP_MAXSCALE; ^ 188. 189. if (!is_mariadb) #552 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:189: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 179 is not freed after the last access at line 189, column 8. 187. SKIP_MAXSCALE; 188. 189. if (!is_mariadb) ^ 190. return SKIP; 191. #553 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:268: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 268, column 3. 266. mysql_optionsv(mysql, MARIADB_OPT_RPL_REGISTER_REPLICA, host, 123); 267. 268. SKIP_SKYSQL; ^ 269. SKIP_MAXSCALE; 270. #554 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:269: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 269, column 3. 267. 268. SKIP_SKYSQL; 269. SKIP_MAXSCALE; ^ 270. 271. if (!is_mariadb) #555 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:269: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 269, column 3. 267. 268. SKIP_SKYSQL; 269. SKIP_MAXSCALE; ^ 270. 271. if (!is_mariadb) #556 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:269: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 269, column 3. 267. 268. SKIP_SKYSQL; 269. SKIP_MAXSCALE; ^ 270. 271. if (!is_mariadb) #557 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:271: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 271, column 8. 269. SKIP_MAXSCALE; 270. 271. if (!is_mariadb) ^ 272. return SKIP; 273. #558 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/rpl_api.c:274: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_init()` on line 258 is not freed after the last access at line 274, column 8. 272. return SKIP; 273. 274. if (!my_test_connect(mysql, hostname, username, ^ 275. password, schema, port, socketname, 0)) 276. { #559 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/t_conc173.c:49: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_real_connect()` on line 48 is not freed after the last access at line 49, column 7. 47. 48. if(!mysql_real_connect(&mysql, hostname, username, password, schema, port, 0, 0)) { 49. fprintf(stderr, "Failed to connect to database after %d iterations: Error: %s\n", i, mysql_error(&mysql)); ^ 50. return 1; 51. } #560 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/thread.c:30: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 23 is not freed after the last access at line 30, column 5. 28. while ((row= mysql_fetch_row(res)) != NULL) 29. { 30. FAIL_IF(mysql_num_fields(res) != 1, "Got the wrong number of fields"); ^ 31. } 32. FAIL_IF(mysql_errno(my), mysql_error(my)); #561 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/thread.c:32: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_store_result()` on line 23 is not freed after the last access at line 32, column 3. 30. FAIL_IF(mysql_num_fields(res) != 1, "Got the wrong number of fields"); 31. } 32. FAIL_IF(mysql_errno(my), mysql_error(my)); ^ 33. 34. mysql_free_result(res); #562 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/view.c:38: error: Null Dereference(NULLPTR_DEREFERENCE) null (null value originating from line 38) is dereferenced. 36. 37. // https://jira.mariadb.org/browse/XPT-266 38. if (IS_XPAND()) { ^ 39. rc= mysql_query(mysql, "SET NAMES UTF8"); 40. check_mysql_rc(rc, mysql); #563 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/view.c:92: error: Dead Store(DEAD_STORE) The value written to `&length` is never used. 90. my_bind[0].buffer_length= 50; 91. my_bind[0].length= &length; 92. length= 4; ^ 93. my_bind[0].is_null= &is_null; 94. rc= mysql_stmt_bind_param(stmt, my_bind); #564 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/view.c:352: error: Memory Leak(MEMORY_LEAK_C) Memory dynamically allocated by `malloc`, indirectly via call to `mysql_stmt_bind_param()` on line 351 is not freed after the last access at line 352, column 3. 350. my_bind[0].is_null = &my_null; 351. rc= mysql_stmt_bind_param(insert_stmt, my_bind); 352. check_stmt_rc(rc, select_stmt); ^ 353. 354. for (i= 0; i < 3; i++) #565 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/view.c:357: error: Dead Store(DEAD_STORE) The value written to `&my_val` is never used. 355. { 356. int rowcount= 0; 357. my_val= i; ^ 358. 359. rc= mysql_stmt_execute(insert_stmt); #566 /home/dan/repos/mariadb-connector-c/unittest/libmariadb/view.c:450: error: Dead Store(DEAD_STORE) The value written to `&rc` is never used. 448. "PRIMARY KEY (K1C4,K2C4,K3C4,K4N4))"); 449. check_mysql_rc(rc, mysql); 450. rc= mysql_query(mysql, ^ 451. "CREATE VIEW v1 AS select sql_no_cache " 452. " K1C4 AS K1C4, K2C4 AS K2C4, K3C4 AS K3C4, K4N4 AS K4N4, " #567 libmariadb/ma_client_plugin.c:255: error: Null Dereference(NULLPTR_DEREFERENCE) `s` could be null (null value originating from line 250) and is dereferenced. 253. return; 254. 255. free_env= strdup(s); ^ 256. plugs= s= free_env; 257. Found 568 issues Issue Type(ISSUED_TYPE_ID): # Null Dereference(NULLPTR_DEREFERENCE): 217 Dead Store(DEAD_STORE): 175 Memory Leak(MEMORY_LEAK_C): 165 Uninitialized Value(PULSE_UNINITIALIZED_VALUE): 11