Commit graph

101 commits

Author SHA1 Message Date
jani@a88-113-38-195.elisa-laajakaista.fi
fc3b3a0a86 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-05-24 13:24:36 +03: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
tomas@whalegate.ndb.mysql.com
19a2814f47 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-opt
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-05-10 08:06:09 +02:00
gni@dev3-221.dev.cn.tlan
305d0eaf02 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb
2007-05-08 09:52:27 +08:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
0f0ef2fe14 WL#2936
Move copying of global variables into thd.variables into plugin_thdvar_init().
  plugin_thdvar_init() may be called multiple times when THD::change_user() is called.
  This fixes a plugin ref-count leak when running the test mysql_client_test
2007-05-04 16:44:07 -07:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
9126286a6a WL#2936
Fix compiler warnings,
  Fix help output - this fixes im test failures.
  Fix incomplete change of SET plugin vars to ulonglong.
  Allow ER() to work without crashing when errmsg.sys has not been loaded.
2007-05-01 18:25:29 -07:00
acurtis/antony@ltamd64.xiphis.org
16e3cd37a2 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  xiphis.org:/home/antony/work2/mysql-5.1-engines.fixme
2007-04-30 16:44:02 -07:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
853fc26252 WL#2936
Change SET variables to be ulonglong type (64bit)
2007-04-30 16:42:15 -07:00
istruewing@chilla.local
581b8504f3 WL#2936 - Falcon & MySQL plugin interface: server variables
Avoid compiler warnings
2007-04-30 18:49:38 +02:00
serg@sergbook.mysql.com
28feb8937d Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.1-wl2936
2007-04-29 08:29:18 -07:00
serg@sergbook.mysql.com
960f009a34 compilation error 2007-04-29 08:24:33 -07:00
antony@ppcg5.local
cfa3f9106e compile-dist failure
fix compile error when DBUG_OFF
2007-04-29 08:12:44 -07:00
istruewing@chilla.local
bb1c3722e4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-wl2936
into  chilla.local:/home/mydev/mysql-5.1-wl2936-two
2007-04-28 14:16:12 +02:00
istruewing@chilla.local
352c273dfc WL#2936 - Falcon & MySQL plugin interface: server variables
Changed back (type != OPT_SESSION) to (type == OPT_GLOBAL)
2007-04-27 23:42:22 +02:00
istruewing@chilla.local
e327818c28 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-wl2936-two
2007-04-27 19:09:39 +02:00
serg@sergbook.mysql.com
31c1a1c9c3 fixed: memleak in --help, sigsegv on shutdown
Ingo's patch:
WL#2936 - Falcon & MySQL plugin interface: server variables
Added initialization for plugin string variables with their
default values.
Added deallocation of string values before a plugin and its
variables is deleted.
Added examples to plugin_example
2007-04-26 21:26:04 +02:00
gni@dev3-221.dev.cn.tlan
1869b2c4d0 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/mysql-5.1-new-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.1/bug18676
2007-04-24 17:34:36 +08:00
istruewing@chilla.local
a90109dd2b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-wl2936
into  chilla.local:/home/mydev/mysql-5.1-wl2936-two
2007-04-24 11:23:12 +02:00
msvensson@pilot.blaudden
a4ee7302e6 Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-24 11:11:45 +02:00
istruewing@chilla.local
98ff6f0a95 WL#2936 - Falcon & MySQL plugin interface: server variables
Added initialization for the plugin structure created in
plugin_add().
Made a correct argument vector in mysql_install_plugin():
handle_options() assumes that arg0 (program name) always exists.
2007-04-24 10:40:23 +02:00
serg@janus.mylan
3e87e65b0a warning added 2007-04-23 19:05:38 +02:00
serg@janus.mylan
f49eb3fde8 mysql-test/t/ndb_dd_basic.test
fixed the test
sql/ha_ndbcluster.cc
    LOCK_plugin is used in ha_ndbcluster.cc
sql/sql_plugin.cc
    LOCK_plugin is used in ha_ndbcluster.cc
2007-04-19 11:05:25 +02:00
serg@janus.mylan
1901fe6e3a comment 2007-04-18 20:46:26 +02:00
istruewing@chilla.local
3a0d2806df WL#2936 - Falcon & MySQL plugin interface: server variables
Fixed a compiler dependent expression to be more portable.
Initialized 'dummy' in construct_help_options() so that loaded
plugin show themselves as TRUE in the help output.
2007-04-18 14:37:57 +02:00
serg@janus.mylan
00479a441d wl#2936 post-merge fixes 2007-04-16 18:16:17 +02:00
serg@sergbook.mysql.com
6bc9bc92df Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.1-wl2936
2007-04-16 10:37:50 +02:00
gni/root@dev3-221.dev.cn.tlan
648b03aa14 BUG#18676 In order to coincide with 5.0 mysqld error code after bug#18676, Map the 4009 ndb error code to 157 mysql error code 2007-04-16 15:15:47 +08:00
serg@sergbook.mysql.com
c53037af36 more wl#2936 fixes: removed implicit ha_thd() calls (too error-prone),
fixed an assert crash
2007-04-15 15:47:27 +02:00
serg@janus.mylan
d2384064f2 sql/sql_plugin.cc
remove endspaces and tabs
2007-04-13 19:24:46 +02:00
serg@janus.mylan
3ecbb5a443 wl#2936 - fixing problems 2007-04-13 19:23:02 +02:00
gluh@mysql.com/eagle.(none)
2d47f0cb1b Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte 2007-04-03 16:13:27 +05:00
antony@ppcg5.local
48f3ec8570 WL#2936
"Plugin Server Variables"
  Post review cleanups.
2007-04-02 11:38:58 -07:00
antony@ppcg5.local
6f21d39d51 WL#2936
"Plugin Server Variables"
  Post review cleanups.
2007-03-28 21:29:16 -07:00
antony@ppcg5.local
d4d37f113e WL#2936
"Server variables for plugins"
  Post review fixes.
2007-03-23 10:14:46 -07:00
serg@janus.mylan
68fd66e853 wl#3700 - post-review fixes:
s/ulonglong/key_part_map/, comments
2007-03-17 00:13:25 +01:00
msvensson@pilot.blaudden
189f592551 Bug#24248 Problem updating from 5.0.15 to 5.1.12 running under Win XP SP2
- Fix error message to say that "mysql_upgrade" should be run when
 a particular error message is found to be missing
 - Dont's set default value on blob's - it will not be used anyway.
2007-03-08 15:43:54 +01:00
antony@ppcg5.local
dc24473cb2 WL#2936
"Server Variables for Plugins"
  Implement support for plugins to declare server variables.
  Demonstrate functionality by removing InnoDB specific code from sql/*
  New feature for HASH - HASH_UNIQUE flag
  New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
  Completed support for plugin reference counting.
2007-03-02 08:43:45 -08:00
serg@janus.mylan
689eed7406 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-02-21 11:36:23 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
cd75806b61 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1
2007-02-03 00:58:09 +02:00
serg@janus.mylan
a07fd5fa8f WL#3700: Handler API change: all index search methods - that is,
index_read(), index_read_idx(), index_read_last(), and
records_in_range() - instead of 'uint keylen' argument take
'ulonglong keypart_map', a bitmap showing which keyparts are
present in the key value.
Fallback method is provided for handlers that are lagging behind.
2007-01-29 10:40:26 +01:00
monty@mysql.com/narttu.mysql.fi
410fc81a72 After merge fixes
Removed a lot of compiler warnings
Removed not used variables, functions and labels
Initialize some variables that could be used unitialized (fatal bugs)
%ll -> %l
2007-01-29 01:47:35 +02:00
brian@zim.(none)
08e93132c4 Two things:
1) Two small windows cleanups for Archive.
2) Patch from Calvin for Falcon to be able to have its own I_S loaded. One example added for this, does hello world.
2007-01-26 15:36:39 -08:00
kent@kent-amd64.(none)
895e442dbf Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-31 01:04:59 +01:00
tomas@poseidon.
044c410968 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.:/home/tomas/mysql-5.1-new-ndb
2006-12-27 11:01:54 +01:00
kent@kent-amd64.(none)
2a10b99907 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/kent/bk/main/mysql-5.1
2006-12-27 02:24:40 +01:00
kent@mysql.com/kent-amd64.(none)
1e3237fefa Many files:
Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
msvensson@pilot.mysql.com
fa33971252 Potential use of NULL pointer in 'plugin_for_each_with_mask', check pointer
before referencing it.
2006-12-22 12:27:26 +01:00
msvensson@pilot.mysql.com
abe43135b1 Bug#22694 "function plugin_foreach_with_mask() uses an uninitialized pointer"
Fix uninitialized memory.
2006-12-22 12:12:58 +01:00
istruewing@chilla.local
cc4e2a85c6 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  chilla.local:/home/mydev/mysql-5.1-axmrg
2006-12-01 22:59:51 +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