Commit graph

606 commits

Author SHA1 Message Date
gkodinov/kgeorge@magare.gmz
fbefe9d552 Merge bk-internal:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
2007-06-12 16:34:54 +03:00
gluh@mysql.com/eagle.(none)
c25c178112 compiler warning fix 2007-06-09 18:18:34 +05: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
kaa@polly.local
561bd78654 Merge polly.local:/home/kaa/src/maint/bug24912/my50-bug24912
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-04-28 20:26:14 +04:00
kaa@polly.local
83e8b70983 Merge polly.local:/home/kaa/src/maint/bug24912/my51-bug24912
into  polly.local:/home/kaa/src/maint/mysql-5.1-maint
2007-04-28 20:08:58 +04:00
kaa@polly.local
a45b654ed7 Merge polly.local:/home/kaa/src/maint/bug24912/my50-bug24912
into  polly.local:/home/kaa/src/maint/bug24912/my51-bug24912
2007-04-28 20:04:03 +04:00
kaa@polly.local
050c6723e8 Fix for bug #24912 "problems with bigint in abs() ceiling() round() truncate() mod()" and a number of related problems:
- unsigned flag was not handled correctly for a number of mathematical funcions, which led to incorrect results
- passing large values as the number of decimals to ROUND() resulted in incorrect results and even server crashes in some cases
- reverted the fix and the testcase for bug #10083 as it violates the manual
- fixed some testcases which relied on broken ROUND() behavior
2007-04-28 20:01:01 +04:00
msvensson@pilot.blaudden
fc904eaead Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-02 11:15:09 +02:00
msvensson@pilot.blaudden
bb9a601829 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-04-02 10:50:39 +02:00
bar@bar.myoffice.izhnet.ru
0a3a898c9d Merge mysql.com:/home/bar/mysql-5.0.b22638
into  mysql.com:/home/bar/mysql-5.1.test
2007-03-30 12:11:21 +05:00
bar@mysql.com
4b3826ba8c Bug#22638 SOUNDEX broken for international characters
Problem: SOUNDEX returned an invalid string for international
characters in multi-byte character sets.
For example: for a Chinese/Japanese 3-byte long character
_utf8 0xE99885 it took only the very first byte 0xE9,
put it into the outout string and then appended with three 
DIGIT ZERO characters, so the result was 0xE9303030 - which
is an invalide utf8 string.
Fix: make SOUNDEX() multi-byte aware and - put only complete
characters into result, thus return only valid strings.
This patch also makes SOUNDEX() compatible with UCS2.
2007-03-28 18:57:30 +05:00
msvensson@pilot.blaudden
164397e71f Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-03-28 09:35:03 +02:00
msvensson@pilot.blaudden
8c5be6a220 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-28 09:34:04 +02:00
msvensson@pilot.blaudden
bed4cb75e4 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197
2007-03-28 09:33:16 +02:00
msvensson@pilot.blaudden
171e91f17d Bug#25197 repeat function returns null when using table field directly as count
- Add extra test case from bug#27073
 - Change "if" to be optimized for count > 0
2007-03-28 09:32:49 +02:00
evgen@moonbone.local
11d37efa5e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt
2007-03-11 00:26:45 +03:00
evgen@moonbone.local
f3e56b5adb Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
2007-03-10 19:57:18 +03:00
evgen@moonbone.local
6f6b9ae3ad Bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
When the SUBSTRING() function was used over a LONGTEXT field the max_length of
the SUBSTRING() result was wrongly calculated and set to 0. As the max_length
parameter is used while tmp field creation it limits the length of the result
field and leads to printing an empty string instead of the correct result.

Now the Item_func_substr::fix_length_and_dec() function correctly calculates
the max_length parameter.
2007-03-10 19:55:34 +03:00
gkodinov/kgeorge@magare.gmz
86cba48b8f Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26281-5.0-opt
2007-03-09 13:05:41 +02:00
gkodinov/kgeorge@magare.gmz
740a5fd7fe Bug #26281:
Fixed boundry checks in the INSERT() function:
 were one off.
2007-03-09 12:47:12 +02:00
msvensson@pilot.blaudden
f5778fc73e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-01 18:12:56 +01:00
msvensson@pilot.blaudden
51a71fb667 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-03-01 14:53:32 +01:00
msvensson@pilot.blaudden
d3a12073f9 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-02-28 11:21:54 +01:00
msvensson@pilot.blaudden
44c56e35b6 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-28 11:21:29 +01:00
monty@mysql.com/narttu.mysql.fi
520d1b4144 Fixed compilations problems and warnings on windows 2007-02-23 22:48:15 +02:00
monty@mysql.com/narttu.mysql.fi
f0ae3ce9b9 Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb
2007-02-23 13:13:55 +02:00
msvensson@pilot.blaudden
ba3c96f507 Bug#25197 repeat function returns null when using table field directly as count
- Return empty string also if count is unsigned and value is 0
2007-02-23 10:28:50 +01:00
monty@mysql.com/narttu.mysql.fi
26aa385bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-21 14:07:08 +02:00
msvensson@pilot.mysql.com
b6f78aa153 Merge pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.1-new-maint
2007-02-14 14:51:49 +01:00
msvensson@pilot.mysql.com
24a242bee1 Merge pilot.mysql.com:/home/msvensson/mysql/bug18628/my50-bug18628
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-14 14:45:15 +01:00
msvensson@pilot.mysql.com
45fe5879f4 Bug#18628 mysql-test-run: security problem(part1)
- Implement --secure-file-priv=<dir> option that limits
  "load_file", "LOAD DATA" and "SELECT .. INTO OUTFILE" to work 
  with files in specified dir.
 - Use above option for mysqld in mysql-test-run.pl
2007-02-14 14:44:34 +01:00
monty@narttu.mysql.fi
8a80e36ac3 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
Merge of 'remove compiler warnings when using -Wshadow'
2007-01-27 03:46:45 +02:00
monty@mysql.com/narttu.mysql.fi
a04157fbb3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-01-22 14:04:40 +02:00
evgen@moonbone.local
8bb16e1e9c Merge moonbone.local:/work/latest-4.1-opt-mysql
into  moonbone.local:/work/latest-5.0-opt-mysql
2007-01-12 16:43:52 +03:00
evgen@moonbone.local
fc0e206cb5 Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed
correctly.

The Item_func::print method was used to print the Item_func_encode and the
Item_func_decode objects. The last argument to ENCODE and DECODE functions
is a plain C string and thus Item_func::print wasn't able to print it.

The print() method is added to the Item_func_encode class. It correctly
prints the Item_func_encode and the Item_func_decode objects.
2007-01-11 16:45:38 +03:00
holyfoot/hf@hfmain.(none)
b4c0867df1 Merge mysql.com:/d2/hf/clean/my51-clean
into  mysql.com:/d2/hf/common/my51-common
2006-12-31 12:41:42 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
874d366500 Merge mysql.com:/d2/hf/clean/my50-clean
into  mysql.com:/d2/hf/common/my50-common
2006-12-31 12:39:20 +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
tsmith/tim@siva.hindu.god
ab4c0f3b81 Merge siva.hindu.god:/usr/home/tim/m/bk/50-build
into  siva.hindu.god:/usr/home/tim/m/bk/51-build
2006-12-20 15:46:36 -07:00
tsmith/tim@siva.hindu.god
2bc45899c0 Bug #24947: REPEAT function returns NULL when passed a field as the count parameter
Handling of large signed/unsigned values was not consistent, so some string functions could return bogus results.
The current fix is to simply patch up the val_str() methods for those string items.
It would be good clean this code up in general, to make similar problems much harder to make.  This is left as an exercise for the reader.
2006-12-19 15:54:12 -07:00
monty@mysql.com/narttu.mysql.fi
a6481aa4c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-12-15 01:01:52 +02:00
monty@mysql.com/narttu.mysql.fi
88dd873de0 Fixed compiler warnings detected by option -Wshadow and -Wunused:
- 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
2006-12-15 00:51:37 +02:00
holyfoot/hf@deer.(none)
edfbcc12cb Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/embt/my51-embt
2006-12-08 15:49:43 +04:00
holyfoot/hf@mysql.com/deer.(none)
4091806268 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/embt/my50-embt
2006-12-08 15:22:46 +04:00
df@kahlann.erinye.com
da7820c37d Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
2006-12-01 13:02:54 +01:00
monty@narttu.mysql.fi
693b906f6e Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-11-30 23:27:16 +02:00
monty@narttu.mysql.fi
430d215c58 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2006-11-30 22:38:12 +02:00