Commit graph

1267 commits

Author SHA1 Message Date
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
13358407e0 Fix for bug #29980: 5.1.20 ate my table
Problem: trying to repair an old (e.g. with "old" varstring fields) corrupted 
table with use_frm option we don't actually repair the table, just altering it
which may couse data loss.

Fix: if use_frm repair option is set, do repair instead of altering even 
if the table needs upgrade.
2007-07-26 13:07:01 +05:00
ramil/ram@ramil.myoffice.izhnet.ru
e6550a65f4 Merge mysql.com:/home/ram/work/b28125/b28125.5.0
into  mysql.com:/home/ram/work/b28125/b28125.5.1
2007-07-20 10:30:40 +05:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
100faf97c4 Fix for bug #28125: ERROR 2013 when adding index.
Problem: we may break a multibyte char sequence using a key 
reduced to maximum allowed length for a storage engine
(that leads to failed assertion in the innodb code, 
see also #17530). 

Fix: align truncated key length to multibyte char boundary.
2007-07-18 12:13:45 +05:00
kostja@bodhi.(none)
f5267530d9 A follow up after the patch for Bug#21074 - even though
we now have exclusive name lock on the table name in mysql_rm_table_part2,
we still should keep LOCK_open - some storage engines are not
ready for locking scope change and assume that LOCK_open is kept.
Still, the binary logging and query cache invalidation calls
moved out of LOCK_open scope.
Fixes some of the broken 5.1-runtime tests (tests break on asserts).
2007-07-14 02:04:48 +04:00
thek@adventure.(none)
08e7d2d312 Merge adventure.(none):/home/thek/Development/cpp/bug21074/my51-bug21074
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-07-02 21:03:10 +02:00
thek@adventure.(none)
863e882785 Bug#21074 Large query_cache freezes mysql server sporadically under heavy load
Invaldating a subset of a sufficiently large query cache can take a long time.
During this time the server is efficiently frozen and no other operation can
be executed. This patch addresses this problem by moving the locks which cause
the freezing and also by temporarily disable the query cache while the 
invalidation takes place.
2007-07-02 19:14:48 +02:00
kostja@bodhi.(none)
68632318dc Manual merge. 2007-06-19 15:02:08 +04:00
istruewing@chilla.local
875cac1ffb Merge chilla.local:/home/mydev/mysql-5.1-amain
into  chilla.local:/home/mydev/mysql-5.1-axmrg
2007-06-15 20:23:20 +02:00
malff/marcsql@weblab.(none)
7e36d37eb0 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
2007-06-15 11:36:31 -06:00
istruewing@chilla.local
676ea58252 Merge chilla.local:/home/mydev/mysql-5.0-amain
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-06-15 17:47:02 +02:00
holyfoot/hf@hfmain.(none)
1e9373fd60 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-06-14 16:42:43 +05:00
holyfoot/hf@hfmain.(none)
8ccc50b303 Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
2007-06-14 16:41:10 +05:00
bar@mysql.com/bar.myoffice.izhnet.ru
6d2ffe7b8e Bug#26402 Server crashes with old-style named table
Problem: crash on attempt to open a table
  having "#mysql50#" prefix in db or table name.
  Fix: This prefix is reserved for "mysql_upgrade"
  to access 5.0 tables  whose file names are not encoded
  according to "5.1 tablename to filename encoded".
  Don't try open tables whose db name or table name
  has this prefix.
2007-06-14 16:28:33 +05:00
gkodinov/kgeorge@magare.gmz
72f395a559 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B27816-5.1-opt
2007-06-12 19:24:48 +03:00
malff/marcsql@weblab.(none)
e6f9d712aa Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
2007-06-11 15:57:59 -06:00
evgen@moonbone.local
24ea0909c9 Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-06-11 17:14:16 +04:00
kostja@bodhi.(none)
6c352d16d9 Follow up after work on Bug 4968
Coding style: classes start with a capital letter.
Rename some classes related to parsing:
create_field -> Create_field
foreign_key -> Foreign_key
key_part_spec -> Key_part_spec
2007-06-10 14:43:57 +04:00
gkodinov/kgeorge@magare.gmz
949d96f175 Bug #27816: Log tables ran with partitions crashes the server
when logging is enabled.
Currently the partition engine doesn't allow log tables to
be partitioned. But this was not checked and the server crashed.
Fixed by adding a check in ALTER TABLE to disable partitioning the
log tables.
While working on the cause of the problem improved the way the log
thread structures are initialized before opening the log tables.
2007-06-08 17:12:42 +03:00
gkodinov/kgeorge@magare.gmz
d12fbdd8d0 Bug #28754: RPM builds differ from tar.gz in "ALTER ... RENAME" on views
When constructing the path to the original .frm file ALTER .. RENAME
 was unnecessary (and incorrectly) lowercasing the whole path when not 
 on a case-insensitive filesystem.
 This path should not be modified because of lower_case_table_names
 as it is already in the correct case according to that setting.
 Fixed by removing the lowercasing.
 Unfortunately testing this would require running the tests on a case
 sensitive filesystem in a directory that has uppercase letters.
 This cannot be guaranteed in all setups so no test case added.
2007-06-08 13:42:10 +03:00
svoj@mysql.com/june.mysql.com
a1529d92d1 BUG#26976 - Missing table in merge not noted in related error msg +
SHOW CREATE TABLE fails

After merge fixes.
2007-06-08 11:20:50 +05:00
svoj@june.mysql.com
d0a044a0bf Merge mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.1-engines
2007-06-07 13:53:23 +05:00
svoj@june.mysql.com
c45b4cf893 Merge 81.176.158.240:devel/mysql/BUG26976/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26976/mysql-5.0-engines
2007-06-07 12:07:41 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
a155d1f926 merging fix 2007-06-06 14:23:56 +05:00
svoj@mysql.com/april.(none)
bd8f81f470 BUG#26976 - Missing table in merge not noted in related error msg +
SHOW CREATE TABLE fails

Underlying table names, that merge engine fails to open were not
reported.

With this fix CHECK TABLE issued against merge table reports all
underlying table names that it fails to open. Other statements
are unaffected, that is underlying table names are not included
into error message.

This fix doesn't solve SHOW CREATE TABLE issue.
2007-06-06 04:42:41 +05:00
tsmith@quadxeon.mysql.com
0ca0984f59 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
2007-06-05 23:06:43 +02:00
tsmith@quadxeon.mysql.com
d2fe24d1ef Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
2007-06-05 23:04:40 +02:00
holyfoot/hf@hfmain.(none)
c571b6e0f9 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28477/my51-28477
2007-06-06 00:20:01 +05:00
tsmith@quadxeon.mysql.com
4b93804592 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/51
2007-06-05 17:51:30 +02:00
tsmith@quadxeon.mysql.com
502320ef05 Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/jun05/50
2007-06-05 17:28:49 +02:00
gkodinov/kgeorge@magare.gmz
0c0201c9a7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28488-5.1-opt
2007-06-05 10:42:47 +03:00
gkodinov/kgeorge@macbook.gmz
f081188fcb Bug #28488: Incorrect information in file: './test/t1_test#.frm'
While executing ALTER TABLE ... PARTITION the server uses 
a temporary "shadow" table to create the updated table.
This shadow table then gets renamed as the original table.
The shadow table was not prefixed with the special prefix that
marks temporary tables so it was picked up by SHOW TABLE STATUS.
Fixed by isolating the code to create the shadow table name in a
separate function and prefixing the shadow table name with the
special prefix to exclude it from the list of user tables.
See bug 18775 and WL1324 for details.
2007-06-04 18:56:29 +03:00
igor@olga.mysql.com
31c57a1efc Post-merge fix. 2007-06-04 03:03:15 -07:00
igor@olga.mysql.com
ca49b83d5a Merge olga.mysql.com:/home/igor/mysql-5.1
into  olga.mysql.com:/home/igor/mysql-5.1-opt-merge
2007-06-03 22:52:02 -07:00
ramil/ram@ramil.myoffice.izhnet.ru
a4e6061a4c Merge mysql.com:/home/ram/work/b28652/b28652.5.0
into  mysql.com:/home/ram/work/b28652/b28652.5.1
2007-06-04 10:14:28 +05:00
sergefp@mysql.com
ad18c4b95c BUG#28427: fix typo, s/bool/uint/ 2007-06-02 21:43:04 +04:00
ibabaev@bk-internal.mysql.com
4bc1738be0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-06-02 00:57:25 +02:00
evgen@moonbone.local
fc01b0995d Bug#28427: Columns were renamed instead of moving by ALTER TABLE.
To avoid unnecessary work the mysql_alter_table function takes the
list of table fields and applies all changes to it (drops/moves/renames/etc).
Then this function compares the new list and the old one. If the changes
require only .frm to be modified then the actual data isn't copied. To detect
changes all columns attributes but names are compared. When a column has been
moved and has replaced another column with the same attributes except name
the mysql_alter_table function wrongly decides that two fields has been just
renamed. As a result the data from the moved column and from all columns
after it is not copied.

Now the mysql_alter_table function forces table data copying by setting
the need_copy_table flag when it finds a moved column. The flag is set at
the stage when the modified fields are created.
2007-06-02 01:21:18 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2b2a80733d Fix for bug #28652: MySQL (with-debug=full) asserts when alter table operations
Problem: we may create a deadlock committing changes in the mysql_alter_table() when 
LOCK_open is set. Moreover, "in some variants of the ALTER TABLE commit
happens earlier, outside of LOCK_open, in other later - inside. It's no good, a storage 
engine code that is called in between could expect a consistency - either there is a 
transaction or there is not".
Fix: move the commit to happen earlier and outside of the LOCK_open.
2007-06-01 22:53:50 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
c17b48fb7b Bug #28477 innodb assertion and crash during alter table to add/drop partition.
The bug was repeated on MyISAM tables, so isn't InnoDB specific.
Reason of the bug is that partition-related members of TABLE_SHARE
wasn't properly updated after ALTER command. So if other thread doesn't
reread frm file, and just uses cached SHARE, it uses wrong data
2007-06-01 19:44:09 +05:00
kostja@bodhi.(none)
679a264357 A post-merge fix. 2007-06-01 13:33:57 +04:00
kostja@bodhi.(none)
16633169e4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-06-01 12:12:06 +04:00
ibabaev@bk-internal.mysql.com
d460dc700a Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-06-01 06:33:37 +02:00
kostja@vajra.(none)
568bf9e38a Fix a compile-time warning. 2007-05-28 16:31:16 +04:00
kostja@vajra.(none)
c759487769 5.1 version of a fix and test cases for bugs:
Bug#4968 ""Stored procedure crash if cursor opened on altered table"
Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
Bug#19182 "CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work from 
stored procedure."
Bug#19733 "Repeated alter, or repeated create/drop, fails"
Bug#22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
Bug#24879 "Prepared Statements: CREATE TABLE (UTF8 KEY) produces a 
growing key length" (this bug is not fixed in 5.0)

Re-execution of CREATE DATABASE, CREATE TABLE and ALTER TABLE 
statements in stored routines or as prepared statements caused
incorrect results (and crashes in versions prior to 5.0.25).

In 5.1 the problem occured only for CREATE DATABASE, CREATE TABLE
SELECT and CREATE TABLE with INDEX/DATA DIRECTOY options).
  
The problem of bugs 4968, 19733, 19282 and 6895 was that functions
mysql_prepare_table, mysql_create_table and mysql_alter_table are not
re-execution friendly: during their operation they modify contents
of LEX (members create_info, alter_info, key_list, create_list),
thus making the LEX unusable for the next execution.
In particular, these functions removed processed columns and keys from
create_list, key_list and drop_list. Search the code in sql_table.cc 
for drop_it.remove() and similar patterns to find evidence.
  
The fix is to supply to these functions a usable copy of each of the
above structures at every re-execution of an SQL statement. 
  
To simplify memory management, LEX::key_list and LEX::create_list
were added to LEX::alter_info, a fresh copy of which is created for
every execution.
  
The problem of crashing bug 22060 stemmed from the fact that the above 
metnioned functions were not only modifying HA_CREATE_INFO structure 
in LEX, but also were changing it to point to areas in volatile memory
of the execution memory root.
   
The patch solves this problem by creating and using an on-stack
copy of HA_CREATE_INFO in mysql_execute_command.

Additionally, this patch splits the part of mysql_alter_table
that analizes and rewrites information from the parser into
a separate function - mysql_prepare_alter_table, in analogy with
mysql_prepare_table, which is renamed to mysql_prepare_create_table.
2007-05-28 15:30:01 +04:00
ibabaev@bk-internal.mysql.com
faf19f9d60 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-05-28 06:25:03 +02:00
igor@olga.mysql.com
48fe280271 Post-merge fix. 2007-05-27 20:14:50 -07:00
kostja@vajra.(none)
0162745cff Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  vajra.(none):/opt/local/work/mysql-5.1-runtime
2007-05-24 19:34:14 +04:00
jani@linux-th5m.site
f1807e1f25 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  linux-th5m.site:/home/my/mysql-5.1-marvel
2007-05-24 15:26:10 +03:00
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
evgen@moonbone.local
c65b50378a sql_table.cc:
After merge fix.
2007-05-23 15:45:37 +04:00