Commit graph

80 commits

Author SHA1 Message Date
Mattias Jonsson
8f39d2584b Bug#40389: REORGANIZE PARTITION crashes when only using one partition
The non documented command 'ALTER PARTITION t REORGANIZE PARTITION'
(without any partitions!) which only make sense for nativly
partitioned engines, such as NDB, crashes the server if there was
no change of number of partitions.

The problem was wrong usage of fast_end_partition function,
which led to usage of a non initialized variable.
2008-12-02 11:18:01 +01:00
Marc Alff
d4d76a6a80 coding style 2008-10-07 16:14:58 -06:00
Marc Alff
e76bb8c665 Bug#36768 (partition_info::check_partition_info() reports mal formed
warnings)

Before this fix, several places in the code would raise a warning with an
error code 0, making it impossible for a stored procedure, a connector,
or a client application to trigger logic to handle the warning.
Also, the warning text was hard coded, and therefore not translated.

With this fix, new errors numbers have been created to represent these
warnings, and the warning text is coded in the errmsg.txt file.
2008-10-06 14:36:15 -06:00
mattiasj@witty.
d733351148 Bug#35305: partition_symlink test failures
Updated the test due to bug 32167

Corrected spelling of error message
2008-03-17 16:11:26 +01:00
antony@pcg5ppc.xiphis.org
91e44529bd Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1
2008-03-14 11:13:54 -07:00
gluh@mysql.com/eagle.(none)
9d42a09675 Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(3rd version for 5.1)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of 'mysql data home'/'any db name' in
DATA DIRECTORY & INDEX DIRECTORY is disallowed
2008-02-28 16:46:52 +04:00
mattiasj@witty.
2e3ed6a216 Post push fix
Fixed a missed case in the patch for Bug#31931.
Also makes Bug#33722 a duplicate of Bug#31931.
Added tests for better coverage.
Replaced some legacy function calls.
2008-02-25 21:18:50 +01:00
mattiasj@witty.
d3937fd63c Merge witty.:/Users/mattiasj/clones/mysql-5.1-bug31931.2
into  witty.:/Users/mattiasj/clones/topush-51
2008-02-24 16:46:35 +01:00
mattiasj@client-10-129-10-137.upp.off.mysql.com
a6a9774849 Bug#31931 Partitions: unjustified 'mix of handlers' error message
Problem was that the mix of handlers was not consistent between
CREATE and ALTER

changed so that it works like:
    - All partitions must use the same engine
      AND it must be the same as the table.
    - if one does NOT specify an engine on the table level
      then one must either NOT specify any engine on any
      partition/subpartition OR for ALL partitions/subpartitions

Note: that after a table have been created, the storage engine
is specified for all parts of the table (table/partition/subpartition)
and so when using alter, one does not need to specify it (unless one
wants to change the storage engine, then one have to specify it on the
table level)
2008-01-09 13:15:50 +01:00
mattiasj@witty.
5d6a65bb50 Bug#30459 Partitioning across disks failing on Windows
Problem was that there are no support for symlinked files on Windows for
mysqld. So we fail when trying to create them.

Solution: Ignore the DATA/INDEX DIRECTORY clause for partitions and push
a warning. (Just like a MyISAM table)
2008-01-04 12:06:20 +01:00
istruewing@stella.local
03d99c5956 Merge stella.local:/home2/mydev/mysql-5.1-amain
into  stella.local:/home2/mydev/mysql-5.1-axmrg
2007-12-11 21:37:33 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
beff6193e0 Fix for bug #29258: Partitions: search fails for maximum unsigned bigint
Problems: 
  1. looking for a matching partition we miss the fact that the maximum 
     allowed value is in the PARTITION p LESS THAN MAXVALUE.
  2. one can insert maximum value if numeric maximum value is the last range.
     (should only work if LESS THAN MAXVALUE).
  3. one cannot have both numeric maximum value and MAXVALUE string as ranges 
    (the same value, but different meanings).

Fix: consider the maximum value as a supremum.
2007-11-26 10:28:25 +04:00
kaa@polly.(none)
04b1c9ca40 Post-merge changes for bug #31207: Test "join_nested" shows different strategy on IA64 CPUs / Intel's ICC compiler. 2007-10-18 15:17:21 +04:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
mikael@dator6.(none)
920a8ed5b3 Merge dator6.(none):/home/mikael/mysql_clones/clean-mysql-5.1
into  dator6.(none):/home/mikael/mysql_clones/bug18198
2007-06-13 16:03:18 +02: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
mikael@dator3.(none)
81db111e24 BUG#18198
Added new test cases, fixed bugs in relation to those
2007-04-20 18:35:16 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
96d012bc2b aftermerging fix 2007-04-05 13:25:39 +05:00
mikron@mikael-ronstr-ms-dator.local
8161ab0b53 Reapplied patch for bug18198 2007-04-04 16:26:32 +02:00
holyfoot/hf@hfmain.(none)
cba85dba20 Merge mysql.com:/home/hf/work/27359/my51-27359
into  mysql.com:/home/hf/work/my_mrg/my51-my_mrg
2007-04-04 14:20:00 +05:00
holyfoot/hf@hfmain.(none)
d7352bdd3e Merge mysql.com:/home/hf/work/24633/my51-24633
into  mysql.com:/home/hf/work/my_mrg/my51-my_mrg
2007-04-04 14:05:45 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
f55ab9ef5e Bug #23675 Partitions: possible security breach via alter
now we return different error message if user doesn't have
SELECT grants
2007-04-04 14:01:47 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
45ac0b6720 Bug #27359 Partition: memory allocation error message
if ndbcluster's nodes aren't set, the handlerton can return zero partitions
in the partitioned table. So we should check for that.
2007-03-27 18:39:11 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
ce89422b97 Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with
partitioned tables"
We have to ignore 'data directory' and 'index directory' parameters
if NO_DIR_IN_CREATE set.
2007-03-11 01:17:41 +04: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
kent@mysql.com/kent-amd64.(none)
1e3237fefa Many files:
Changed header to GPL version 2 only
2006-12-27 02:23:51 +01:00
monty@mysql.com/narttu.mysql.fi
3a35c30027 Fixed compiler warnings (Mostly VC++):
- Removed not used variables
- Changed some ulong parameters/variables to ulonglong (possible serious bug)
- Added casts to get rid of safe assignment from longlong to long (and similar)
- Added casts to function parameters
- Fixed signed/unsigned compares
- Added some constructores to structures
- Removed some not portable constructs

Better fix for bug Bug #21428 "skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
(Added new parameter to net_clear() to define when we want the communication buffer to be emptied)
2006-11-30 03:40:42 +02:00
monty@mysql.com/nosik.monty.fi
ca99516cc7 Fixed a lot of compiler warnings (Mainly in mysqld and instance manager)
Fixed some possible fatal wrong arguments to printf() style functions
Initialized some not initialized variables
Fixed bug in stored procedure and continue handlers
(Fixes Bug#22150)
2006-11-01 19:41:09 +02:00
mikael/pappa@dator5.(none)
4a7cd3a1cb Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-10-16 15:40:40 -04:00
mikael/pappa@dator5.(none)
1cdf82e012 BUG#18198: Partition function handling
Fixes of after review fixes
2006-10-02 15:52:29 -04:00
brian@zim.(none)
56505c01f9 This patch updates to remove most global hton needs. Cleans up wrong message in partition. 2006-09-30 18:31:13 -07:00
mikael/pappa@dator5.(none)
81248942b7 BUG#18198: Partition function handling
Review fixes
2006-09-30 17:38:15 -04:00
brian@zim.(none)
46ae2113ba This patch adds handlerton passing to functions. NDB and Innodb still require a global hanlderton in the main code due to the nature of the sql_cache call back function (should be solveable... another patch).
Partitioning now has a flag to allow disabling of engines from being compatible with partitioning. Cleaned up heap naming convention on panic call.
2006-09-30 12:49:46 -07:00
mikael/pappa@dator5.(none)
6be97e4e43 Final step of Take 7 on review fixes of this
fairly complex bug
2006-09-26 16:30:39 -04:00
mikael/pappa@dator5.(none)
6df933a8cb BUG#18198
Fixed interface to check_partition_func_processor
2006-09-26 02:30:40 -04:00
mikael/pappa@dator5.(none)
de9001d3c4 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug18198
2006-09-26 01:49:14 -04:00
brian@zim.(none)
7194b6d75a This changes the order of the universe, black is now the new white.
In practice this means that handlerton is now created by the server and is passed to the engine. Plugin startups can now also control how plugins are inited (and can optionally pass values). Bit more flexibility to those who want to write plugin interfaces to the database.
2006-09-15 10:28:00 -07:00
mikael/pappa@dator5.(none)
032d208be2 BUG#18198: Partition function handling
Review fixes
2006-07-21 10:23:32 -04:00
mikael/pappa@dator5.(none)
eae8c963c5 Merge mronstrom@bk-internal.mysql.com:/home/bk/bugs/bug18198
into  dator5.(none):/home/pappa/bug18198
2006-07-12 11:33:22 -04:00
mikael/pappa@dator5.(none)
d6d6783b6a BUG#18198: Fix 2006-07-12 11:22:13 -04:00
tomas@poseidon.ndb.mysql.com
9791d53445 partition functions to pass create_info, not only max_rows 2006-06-27 22:19:27 +02:00
mikael@dator5.(none)
5771a711f0 BUG#18198: Less flexibility in defining partition functions
Changed test for functions if they are supported.
3 categories:
1) Fully supported
2) Supported for single character collations
3) Supported for binary collations
2006-06-23 01:21:26 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
67e6e8b423 merge update 2006-06-14 19:40:06 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
8484ea8b04 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19801
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
2006-06-14 09:22:27 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
e91454f89e Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug16002
2006-06-14 09:12:07 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
b51515c998 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19801
2006-06-14 08:51:39 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
ac0354c783 BUG#19801: Problems with single partition with only NULL allowed in LIST partitioning
After review fix
2006-06-14 08:35:19 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
6d519a2370 Merge c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1
into  c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19307
2006-06-13 21:41:02 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
59c0034061 BUG#19307: CSV engine can cause crashes in partitioned tables (due to its conversion of NULLs to 0) 2006-06-13 14:36:23 -04:00
mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se
bda7c1fd13 BUG#16002: More review fixes 2006-06-06 11:54:21 -04:00