1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
Georg Richter
45179cffc4 Merge remote-tracking branch 'origin/3.1' into 3.4 2024-04-29 11:15:02 +02:00
Georg Richter
558ad7d68d CONC-677:
Fix possible memory leak: If get_default_configuration_dirs() function
fails, we need to release previously allocated memory for
configuration_dirs.
2024-02-24 17:06:03 +01:00
Georg Richter
1acb81e11c Build fixes:
- Fixed build error, which was previously introduced by commit
c8ca89112e

- Treat warnings as errors
2023-08-16 14:09:34 +02:00
Marko Mäkelä
d12fd88b6c Fix clang -Wunused-but-set-variable 2022-07-01 08:20:25 +03:00
Georg Richter
80d9aaa723 Fix for CONC-537: Only read from MYSQL_HOME if MARIADB_HOME is not set
To allow to use different configuration directories for MariaDB and MySQL,
configuration files from MYSQL_HOME environment variable will be
processed only, if MARIADB_HOME environment variable was not set.
2021-03-22 10:16:13 +01:00
Georg Richter
d24e742e0e CONC-449:
Beside MYSQL_HOME we also check if MARIADB_HOME was set, and try to
read configuration file from this directory.
2020-01-29 13:22:38 +01:00
Georg Richter
dfa8b03c60 CONC-416:
Changed order for lookup configuration files on Windows:
1) GetSystemWindowsDirectory
2) GetSystemDirectory
3) Windows directory
4) C:\
2019-06-03 10:17:08 +02:00
Georg Richter
821185c20c Fix for CONC-387:
Fix case sensitive include file names for cross compiling
2019-02-05 14:00:49 +01:00
Georg Richter
f1ef0d1ff2 Fix for CONC-370:
Prevent memory leak if an error occurred while processing configuration
file.
2018-11-08 11:32:45 +01:00
Georg Richter
b0f2e4e72f Coverity fixes and travis integration 2018-07-06 09:28:24 +02:00
Georg Richter
ec985d92c0 CONC-327:
Add support for !include an !includedir in configuration files
2018-05-02 11:40:42 +02:00
Georg Richter
679b5b5cb7 Fix for CONC-317:
Parsing of configuration file fails if key/value pairs contain white spaces.
2018-04-12 07:00:43 +02:00
Vladislav Vaintroub
931450c3f8 Fix some conversion warnings.
Exclude definitions from my_config.h that conflict with server's config.h
(most of ma_config.h is not used by connector anyway)

Avoid overriding server's SIGN_TARGET() macro, if used as subproject.
Make WITH_UNIT_TESTS exclude unit tests, like it is for the server.
2017-09-30 22:38:53 +00:00
Sergei Golubchik
67277fb1d1 followup for e2df6d2: default directories, files, and groups
* do not read ini_exts array beyond the end
* do not use local variable (val) address outside of the variable's scope
* do not read $HOME/my.cnf
* do not create files in the user's $HOME, use $MYSQL_TMP_DIR
* test reading of the executable name group
* fail the test if .my.cnf cannot be opened
2017-07-04 19:34:28 +02:00
Georg Richter
e2df6d2552 Fix for MDEV-12965 and MDEV-13100:
If no configuration file and no configuration group was specified, Connector/C ddoesn't read any configurationm files.
By default the follwing groups will be read:
- client
- client-server
- client-mariadb

If no configuration file was specified, Connector/C looks up for configuration files in following locations:
- Windows:
  - System directory
  - Windows directory
  - C:\
  - Directoy from which the application was started
  - MYSQL_HOME environment variable
- Unix platforms
  - DEFAULT_SYSCONFIR (if specified)
  or
  - /etc and /etc/mysql
  - MYSQL_HOME environment variable
  - .my.cnf in home directory

Special case: If NULL or empty string will be passed for MYSQL_READ_DEFAULT_GROUP option Connector/C will read the default groups and the group which matches the application name.
2017-06-25 14:14:55 +02:00
Georg Richter
99d054ebad Fix for MDEV-12578: Connector/C doesn't read .my.cnf file in home directory.
After lookup in standard directories C/C now also checks in home directory for
configuration file .my.cnf
2017-05-07 07:46:43 +02:00
Georg Richter
6bec9204f0 Fix for MDEV-12446:
When no default configuration is present, C/C crashed due to double free
in ma_default.c
2017-03-20 07:29:51 +01:00
Georg Richter
b10c4f9e7b Fix for CONC-231: Incorrect FSF address 2017-02-05 11:35:11 +01:00
Georg Richter
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00