Commit graph

96 commits

Author SHA1 Message Date
Staale Smedseng
c429fac63c Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
Staale Smedseng
30fccdaaae Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.
                  
This bug will be resolved in more than one patch to limit the
size of changesets. This is the second patch, fixing more
of the warnings.
2009-06-17 15:54:01 +02:00
Staale Smedseng
e6e1f4ac84 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.
            
This bug will be resolved in more than one patch to limit the
size of changesets. This is the second patch, fixing more
of the warnings.
2009-06-10 16:04:07 +02:00
gkodinov/kgeorge@macbook.gmz
fd9993db87 fixed warnings from the fix of 26243 2008-03-29 17:50:46 +02:00
gkodinov/kgeorge@magare.gmz
f6871c0d66 Merge magare.gmz:/home/kgeorge/mysql/autopush/B26461-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B26461-5.1-opt
2008-03-21 17:48:28 +02:00
gkodinov/kgeorge@macbook.gmz
ff0aac178d Bug #26461: Intrinsic data type bool (1 byte) redefined to BOOL (4 bytes)
The bool data type was redefined to BOOL (4 bytes on windows).
Removed the #define and fixed some of the warnings that were uncovered
by this.
Note that the fix also disables 2 warnings :
4800 : 'type' : forcing value to bool 'true' or 'false' (performance warning)
4805: 'operation' : unsafe mix of type 'type' and type 'type' in operation

These warnings will be handled in a separate bug, as they are performance related or bogus.

Fixed to int the return type of functions that return more than 
2 distinct values.
2008-03-21 17:23:17 +02:00
kostja@bodhi.(none)
91fe15bb9d Fix doxygen warnings. 2007-08-15 17:43:08 +04:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (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
2007-05-10 12:59:39 +03:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
878759b218 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b23782/b23782.5.0
2007-02-06 17:18:43 +04:00
ramil/ram@ramil.myoffice.izhnet.ru
61ec25116e Merge mysql.com:/home/ram/work/b23782/b23782.5.0
into  mysql.com:/home/ram/work/b23782/b23782.5.1
2007-02-06 15:59:37 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
85f2f924fd Fix for bug #23782: Stored procedures: crash if variable in procedure
analyse

We have to call fix_fields() for procedure analyse' arguments as they may   
not be
fixed in some circumstances.

(as the crash appears when mysqld starts skipping binlog, a test case
will be added when we can --skip-bin-log in -master.opt)
2007-02-06 15:58:40 +04:00
kent@kent-amd64.(none)
58763e383e Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-31 01:32:21 +01:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
  Don't update the files from BitKeeper
Many files:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
Many files:
  Added GPL copyright text
Removed files:
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/xwf
2006-12-31 01:02:27 +01:00
kent@kent-amd64.(none)
be15e3bc15 Merge mysql.com:/home/kent/bk/main/mysql-5.0
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-23 20:20:40 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
brian@zim.(none)
31d67280f7 This finishes the work (someone) started to remove FIELD_ types and use the Enum MYSQL types. The second part to this is to actually deprecate the FIELD defines in mysql_com.h 2006-12-01 17:26:52 -08:00
iggy@rolltop.ignatz42.dyndns.org
70dcbe3e6c Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my50-bug20305
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my51-bug20305
2006-09-28 14:33:39 -04:00
iggy@rolltop.ignatz42.dyndns.org
d36444a9ec Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my41-bug20305
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/bug20305/my50-bug20305
2006-09-28 14:32:30 -04:00
iggy@rolltop.ignatz42.dyndns.org
f063bee3b2 Bug#20305: PROCEDURE ANALYSE() returns wrong M for FLOAT(M, D) and DOUBLE(M, D) 2006-09-28 14:30:20 -04:00
serg@serg.mylan
d00b56549c String::set(double) and set(longlong) -> set_real() and set_int()
fix Field::store(double) being used instead of store(longlong)

NB: overloading functions is evil
2006-06-16 12:17:20 +02:00
monty@mysql.com
1994ed49ec Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests
2006-03-29 14:27:36 +03:00
brian@zim.(none)
78abb2d117 Porting fix that allows others to include compiled code with different parsers.
Makes you wonder what I am up to, doesn't?
2006-03-09 10:09:52 -08:00
bell@sanja.is.com.ua
806f9e24ff Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
2005-11-20 20:47:07 +02:00
hf@deer.(none)
f3502cd983 Additional fix for bug #14445 (analyse.test fails) 2005-11-01 16:14:26 +04:00
hf@deer.(none)
b98c93e0a8 Fix for bug #14445 (analyse.test fails) 2005-11-01 13:08:14 +04:00
jani@ua141d10.elisa.omakaista.fi
e512bddc2c Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
2005-09-13 18:23:37 +03:00
jani@ua141d10.elisa.omakaista.fi
cb4f132075 Merged code. Removed unneccessary repeating. 2005-09-13 18:11:51 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
91b6fe2679 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-09-11 11:07:56 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
ac95c9096b Fixed Bug#10716, Procedure Analyse results in wrong values for optimal field type
Added test case.
2005-09-09 20:02:13 +03:00
monty@mysql.com
775f17667b Merge with 4.1 2005-06-07 00:31:53 +03:00
serg@serg.mylan
6a5349028c a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
monty@mysql.com
29fd1f2fd9 Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
2005-06-03 23:46:03 +03:00
kent@mysql.com
f0fcc54b0c Merge 2005-06-02 04:45:09 +02:00
kent@mysql.com
bd48eed988 tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
2005-06-02 02:43:32 +02:00
msvensson@neptunus.(none)
697cfe7f07 Merge from 4.1 2005-05-26 21:01:55 +02:00
msvensson@neptunus.(none)
83d430353e Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"
2005-05-26 12:09:14 +02:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
monty@mysql.com
218e00ac68 Fixed BUILD script to use --with-berkeley-db instead of --with-bdb
Lots of small fixes to multi-precision-math path
Give Note for '123.4e'
Added helper functions type 'val_string_from_real()
Don't give warnings for end space for string2decimal()
Changed storage of values for SP so that we can detect length of argument without strlen()
Changed interface for str2dec() so that we must supple the pointer to the last character in the buffer
2005-02-19 18:58:27 +02:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
monty@mysql.com
209190d3df Review fixed 2005-02-02 22:39:21 +02:00
patg@patrick-galbraiths-computer.local
1bceba0995 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into patrick-galbraiths-computer.local:/Users/patg/mysql-5.0
2005-01-25 09:35:57 -08:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
patg@pc248.lfp.kcls.org
1da60b9f45 -Added quote_data and needs_quotes (moved from federated handler.
-New tests and results

logging_ok:
  Logging to logging@openlogging.org accepted
ha_federated.h:
  removed quote_data and type_quote (now in the Field class)
ha_federated.cc:
  moved quote_data and type_quote to field class
field.h:
  new methods quote_data and needs_quotes declared
field.cc:
  new field class methods quote_data and needs_quotes (per Monty's request)
federated.test:
  more tests, joins, index tests
have_federated_db.require:
  new name of federated system var
federated.result:
  new test results for federated handler
have_federated_db.inc:
  changed name of variable in test due to change in vars
sql_analyse.cc:
  over-ridden append_escaped to take (String *, char *, uint) per requirements of 'create_where_from_key' method in federated handler.
mysql_priv.h:
  define over-ridden append_escaped to take arguments from 'create_where_from_key' method in federated handler 
ha_federated.cc:
  implemented "create_where_from_key" to deal properly with two-byte prefix and multi keys. Initial testing shows it works, but I still need to move quoting to field class and also look at changes per Segei's suggestions.
2005-01-20 18:36:40 -08:00
konstantin@mysql.com
019ff4c577 Manual merge. 2005-01-13 02:19:35 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
3e3e140e3d Minor clean up. 2005-01-12 22:55:10 +02:00
jimw@mysql.com
fd7d355fbd Merge mysql.com:/home/jwinstead2/mysql-4.1-clean
into mysql.com:/home/jwinstead2/mysql-5.0-clean
2005-01-12 17:05:33 +01:00
jani@ua141d10.elisa.omakaista.fi
fd79354273 Fixed Bug#2813, "analyse does not quot string values in enams from string". 2005-01-11 19:40:33 +02:00
konstantin@mysql.com
e5f4c7a0bd Rename: Item::val -> Item::val_real(). 2004-11-11 21:39:35 +03:00
serg@serg.mylan
413a8753e2 merged 2004-09-07 15:18:53 +02:00