summaryrefslogtreecommitdiff
path: root/mysys/default.c
Commit message (Collapse)AuthorAgeFilesLines
* Up-merge from 5.0: Fix for Bug#20748, Configuration files should not be read ↵Timothy Smith2008-06-271-136/+130
|\ | | | | | | | | more than once Differences in 5.1: include "/etc/mysql/" in include directories; no OS/2 support.
| * Bug #20748: Configuration files should not be read more than onceTimothy Smith2008-06-241-155/+129
| | | | | | | | Normalize directory names before adding them to default_directories.
* | Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50tsmith@ramayana.hindu.god2007-11-191-3/+12
|\ \ | |/ | | | | into ramayana.hindu.god:/home/tsmith/m/bk/build/51
| * Eliminate 'unused variable' warnings when compiling non-debug buildtsmith@ramayana.hindu.god2007-11-161-3/+12
| |
* | Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50-fixtsmith@ramayana.hindu.god2007-11-091-6/+6
|\ \ | |/ | | | | into ramayana.hindu.god:/home/tsmith/m/bk/build/51-fix
| * Fix Windows build problems.tsmith@ramayana.hindu.god2007-11-091-7/+7
| |
* | Merge ramayana.hindu.god:/home/tsmith/m/bk/build/b20748/50tsmith@ramayana.hindu.god2007-11-071-61/+106
|\ \ | |/ | | | | into ramayana.hindu.god:/home/tsmith/m/bk/build/b20748/51
| * Bug #20748: Configuration files should not be read more than oncetsmith@ramayana.hindu.god2007-11-071-63/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user could not override system-wide settings in their ~/.my.cnf, because the DEFAULT_SYSCONFDIR was being searched last. Also, in some configurations (especially when the --sysconfdir compile-time option is set to /etc or /etc/mysql), the system-wide my.cnf file was read multiple times, causing confusion and potential problems. Rearrange default directories to conform to the manual and logic. Move --sysconfdir=<path> (DEFAULT_SYSCONFDIR) from the last default directory to the middle of the list. $HOME/.my.cnf should be last, so the user is able to override the system-wide settings. Change init_default_directories() to remove duplicates from the list.
* | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
* | Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50tsmith@quadxeon.mysql.com2007-04-281-1/+1
|\ \ | |/ | | | | into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
| * Bug #27390: mysqld_multi --config-file= not working as documentedtsmith@quadxeon.mysql.com2007-04-281-1/+1
| | | | | | | | | | | | | | | | Recognize the --no-defaults, --defaults-file and --defaults-extra-file options. Treat old --config-file argument as if --defaults-extra-file had been specified instead. Plus a few other defaults-related cleanups.
| * Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-02-211-19/+19
| |\ | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| * | Reverting change adding /etc/mysql support, as it breaks some installs.mtaylor@qualinost.(none)2007-01-261-6/+4
| | |
* | | Merge mysql.com:/home/my/mysql-5.0monty@narttu.mysql.fi2007-01-271-19/+19
|\ \ \ | | |/ | |/| | | | | | | into mysql.com:/home/my/mysql-5.1 Merge of 'remove compiler warnings when using -Wshadow'
| * | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-01-221-19/+19
| |\ \ | | |/ | |/| | | | into mysql.com:/home/my/mysql-5.0
| | * Fixed compiler warnings detected by option -Wshadow and -Wunused:monty@mysql.com/narttu.mysql.fi2006-12-151-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
| * | Merge siva.hindu.god:/usr/home/tim/m/bk/g50tsmith/tim@siva.hindu.god2006-12-261-2/+1
| |\ \ | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/50
* | \ \ Merge siva.hindu.god:/usr/home/tim/m/bk/g51tsmith/tim@siva.hindu.god2006-12-261-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/tmp/mrg51-dec26
| * \ \ \ Merge qualinost.(none):/home/mtaylor/src/mysql-5.0-maintmtaylor@qualinost.(none)2006-12-151-4/+6
| |\ \ \ \ | | |/ / / | | | | | | | | | | into qualinost.(none):/home/mtaylor/src/mysql-5.1-maint
| | * | | Added /etc/mysql to my.cnf search path after /etc. mtaylor@qualinost.(none)2006-12-151-4/+6
| | | |/ | | |/| | | | | | | | | bug #25104
* | | | Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-231-2/+1
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| into mysql.com:/home/kent/bk/main/mysql-5.1
| * | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| |/ | | | | | | Changed header to GPL version 2 only
* | Merge mysql.com:/home/my/mysql-5.0monty@nosik.monty.fi2006-11-221-3/+3
|\ \ | |/ | | | | into mysql.com:/home/my/mysql-5.1
| * Remove compiler warningsmonty@mysql.com/nosik.monty.fi2006-11-201-3/+3
| | | | | | | | | | | | | | (Mostly in DBUG_PRINT() and unused arguments) Fixed bug in query cache when used with traceing (--with-debug) Fixed memory leak in mysqldump Removed warnings from mysqltest scripts (replaced -- with #)
* | Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0jani@a193-229-222-105.elisa-laajakaista.fi2006-05-301-1/+3
|\ \ | |/ | | | | into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
| * Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1msvensson@neptunus.(none)2006-05-291-1/+3
| |\ | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.0
| | * Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequencemsvensson@neptunus.(none)2006-05-111-1/+3
| | | | | | | | | | | | | | | - Check that length of value is longer than 1 before decrementing length by 2. - Backport from 5.0, make it possible to use my_print_defaults in tests
* | | This is an implementation of two WL items:anozdrin@mysql.com2006-05-181-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - WL#3158: IM: Instance configuration extensions; - WL#3159: IM: --bootstrap and --start-default-instance modes The following new statements have been added: - CREATE INSTANCE; - DROP INSTANCE; The behaviour of the following statements have been changed: - SET; - UNSET; - FLUSH INSTANCES; - SHOW INSTANCES; - SHOW INSTANCE OPTIONS;
* | | Another long patch to remove the rest of the OS2 support. brian@zim.(none)2006-04-151-5/+1
|/ /
* | Bug#15069 [patch] my_print_defaults does'nt care --sysconfdirmsvensson@shellback.(none)2006-04-101-1/+9
| | | | | | | | | | | | | | - Grab the path from "configure --sysconfdir=<path>" and set it as the first place to look for my.cnf files Do this both in Makefiles for libmysql and mysys - Patch provided by Francesco Riosa. Thank you!
* | Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0jonas@perch.ndb.mysql.com2005-09-301-0/+4
|\ \ | | | | | | | | | into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push
| * | export forced_defaults_file using global variable defaults_filejonas@perch.ndb.mysql.com2005-09-301-0/+4
| | | | | | | | | | | | analog with defaults_extra_file and defaults_grouop_suffix
* | | Fixed a missing cast.jani@a193-229-222-105.elisa-laajakaista.fi2005-09-201-1/+1
|/ /
* | A fix (bug #12917: The --defaults-extra-file option is ignored by the 5.0 ↵ramil@mysql.com2005-09-091-0/+3
| | | | | | | | client binaries).
* | Ensure we free all items for prepared statementsmonty@mysql.com2005-07-291-1/+1
| | | | | | | | | | | | Before the fix in ~Prepared_statments we got a memory leak when executing mysql_client_test.test Note that test 'variables.test' fails. This will be fixed when Jimw pushes the fix for Bug 10351
* | Cleanups during review of new codemonty@mysql.com2005-07-281-26/+26
| | | | | | | | Ensure mysql_close() is called if mysql_set_character_set() fails
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mishka.local2005-07-181-78/+112
|\ \ | | | | | | | | | into mishka.local:/home/my/mysql-5.0
| * | Cleanups during reviewmonty@mishka.local2005-07-181-78/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | Changed defaults option --instance to --defaults-group-suffix Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX mysql_print_defaults now understands --defaults-group-suffix Remove usage of my_tempnam() (not safe function) if( -> if ( and while( to while (
* | | Look in the directory above the executable for the my.cnf/ini, on Windows, asjimw@mysql.com2005-07-061-12/+80
|/ / | | | | | | | | the new installer and GUI tools expect. (Bug #10419) Also, dynamically bind to GetSystemWindowsDirectory() so that it works on all platforms. (Bug #5354)
* | Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndbmarty@linux.site2005-06-301-1/+1
|\ \ | | | | | | | | | into linux.site:/home/marty/MySQL/mysql-5.0
| * | fixes for windows 64-bit compiler warningsgeorg@lmy002.wdf.sap.corp2005-06-131-1/+1
| | |
* | | Merge mysql.com:/home/jonas/src/wl1882joreland@mysql.com2005-06-131-1/+59
|\ \ \ | |/ / |/| | | | | into mysql.com:/home/jonas/src/mysql-5.0-ndb
| * | Add "--instance=name" option to load_defaults (or env(MYSQL_INSTANCE)) joreland@mysql.com2005-06-071-1/+59
| | | | | | | | | | | | | | | which enables having multiple mysqld in same my.cnf without mysql_multi or IM
* | | fixes for compiler warnings from VC6reggie@monster.2005-06-061-1/+1
|/ /
* | Merge mysql.com:/home/jimw/my/mysql-5.0-buildjimw@mysql.com2005-05-181-0/+3
|\ \ | | | | | | | | | into mysql.com:/home/jimw/my/mysql-5.0-clean
| * | default.c:kent@mysql.com2005-05-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabled use of GetSystemWindowsDirectory() when compiled with VC6 mysql.cc: Removed unused variable 'field' from print_warnings() libmysql.dsp: Added "my_chsize.c" and "my_seek.c" mysqlclient.dsp: Added "my_chsize.c"
* | | New file default_modify.c. Fixed a typo on mysqld.ccjani@a193-229-222-105.elisa-laajakaista.fi2005-05-181-135/+0
| | | | | | | | | | | | | | | | | | Changed name of function my_correct_default_file to modify_defaults_file. Improved function and fixed some bugs in it.
* | | fix commentspetr@mysql.com2005-05-181-2/+2
|/ /
* | a fix (bug #10655: mysys/default.c compilation problem).ramil@mysql.com2005-05-161-2/+1
| |
* | Mergepetr@mysql.com2005-05-161-0/+138
|\ \