Commit graph

722 commits

Author SHA1 Message Date
gkodinov@dl145s.mysql.com
fd28e74aa6 Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-opt
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.0-opt
2006-11-29 15:21:28 +01:00
gkodinov@dl145s.mysql.com
32c9e11df9 Merge bk-internal:/home/bk/mysql-5.1
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.1-opt
2006-11-28 17:14:16 +01:00
dli@dev3-76.dev.cn.tlan
95478c16da ndb - fiexed for bug#15021, binlog_index table become inconsistent if errors during purge of binlogs.
improved the original patch, changed if/else to switch/case.
2006-11-28 11:14:36 +08:00
monty@mysql.com/nosik.monty.fi
9c3a2a0d8e Increased heap max length to > 4G for 64 bit machines
Initialize key_part->type on open. This caused key_copy() to fail for bit_fields. (key_copy is used in HANDLER and opt_range)
2006-11-28 00:47:21 +02:00
gkodinov@dl145s.mysql.com
e74c9add47 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-11-27 16:25:52 +01:00
evgen@moonbone.local
b5b7b03ff3 Bug#17254: Error for DEFINER security on VIEW provides too much info
If a view was created with the DEFINER security and later the definer user
was dropped then a SELECT from the view throws the error message saying that
there is no definer user is registered. This is ok for a root but too much
for a mere user.

Now the st_table_list::prepare_view_securety_context() function reveals
the absence of the definer only to a superuser and throws the 'access denied'
error to others.
2006-11-27 16:15:32 +03:00
monty@nosik.monty.fi
313f23a93a Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/home/my/mysql-5.1
2006-11-27 14:07:52 +02:00
monty@mysql.com/nosik.monty.fi
fa81a82e7f Fixed a LOT of compiler warnings
Added missing DBUG_RETURN statements (in mysqldump.c)
Added missing enums
Fixed a lot of wrong DBUG_PRINT() statements, some of which could cause crashes
Removed usage of %lld and %p in printf strings as these are not portable or produces different results on different systems.
2006-11-27 01:47:38 +02:00
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
c610c271fa Bug #24487 Valgrind: uninited byte in table->record[1] in binlog code for rbr + innodb
The reason of this valgrind's compaint is not a bug but rather a feature of bitwise ops:
for any value of the byte x
x | 1 -> 1,  and x & 0 -> 0.
x, being a null_byte part of record[1] can be left unassigned even after
ha_innobase::index_read_idx because the above and still be correct.
Addding a check memory upon the invocation of the function can detect this fact
long before record[1], old record, is eventually passed to my_write.

Fixed with initialization of record[1]'s null_bytes part in open_table_from_share.
2006-11-26 15:55:49 +02:00
monty@nosik.monty.fi
38a92caeb7 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2006-11-21 23:12:45 +02:00
monty@mysql.com/nosik.monty.fi
f6682e2743 Added --debug-info to most clients to detect memory leaks in mysql-test-run
Moved .progress files into the log directory
Moved 'cluster' database tables into the MySQL database, to not have 'cluster' beeing a reserved database name
Fixed bug where mysqld got a core dump when trying to use a table created by MySQL 3.23
Fixed some compiler warnings
Fixed small memory leak in libmysql
Note that this doesn't changeset doesn't include the new mysqldump.c code required to run some tests. This will be added when I merge 5.0 to 5.1
2006-11-21 22:32:58 +02:00
mats@romeo.(none)
600a6a676c BUG#24403 (valgrind complaint on uninited st_table for innodb + rbr):
Removing DBUG_DUMP printouts for valgrind builds since they trigger warnings.
Removing valgrind memory checks completely.
Removing bzero() of record when opening table that was added earlier.
2006-11-21 13:57:52 +01:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
540eb5ac4c Bug #24403 valgrind complained on uninited st_table, rbr + innodb
open_table_from_share did not initialize table->record members. that was
  interpreted as the error by valgrind.
  
  Fixed with bzero-ing the members if compilation with -DHAVE_purify.
2006-11-17 23:44:14 +02:00
holyfoot/hf@deer.(none)
7d190dd6b1 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/mysql-5.1-mrg
2006-11-17 19:01:35 +04:00
holyfoot/hf@mysql.com/deer.(none)
e95e23b0f3 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-0mrg
2006-11-17 10:30:16 +04:00
jani@ua141d10.elisa.omakaista.fi
596f64d91a Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
2006-11-16 14:38:45 +02:00
holyfoot/hf@deer.(none)
938ba3e11e Merge mysql.com:/home/hf/work/mysql-5.0.clean
into  mysql.com:/home/hf/work/mysql-5.1.clean
2006-11-08 19:09:39 +04:00
anozdrin/alik@alik.
ee15c11b7c Merge alik.:/mnt/raid/alik/MySQL/devel/5.1
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-2
2006-11-07 16:24:35 +03:00
anozdrin/alik@alik.
18fb4abff4 Merge alik.:/mnt/raid/alik/MySQL/devel/5.1-monty
into  alik.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2006-11-03 14:00:35 +03:00
cmiller@zippy.cornsilk.net
b074e13483 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-11-02 17:51:59 -05:00
cmiller@zippy.cornsilk.net
c34f3219b3 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-11-02 17:27:42 -05:00
igor@rurik.mysql.com
79abdb38f8 Merge rurik.mysql.com:/home/igor/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug21727
2006-11-01 14:50:14 -08: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
igor@rurik.mysql.com
2a7acba7e1 Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Allocation of memory for the sort buffer at each evaluation of a
subquery may take a significant amount of time if the buffer is rather big.
With the fix we allocate the buffer at the first evaluation of the
subquery and reuse it at each subsequent evaluation.
2006-10-31 17:31:56 -08:00
tsmith/tim@siva.hindu.god
3af2089b13 Merge siva.hindu.god:/usr/home/tim/m/bk/g50
into  siva.hindu.god:/usr/home/tim/m/bk/50
2006-10-24 14:42:08 -06:00
petr/cps@owlet.local
eda71e24c3 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/home/cps/mysql/devel/5.1-rename-bug
2006-10-24 17:00:23 +04:00
tsmith/tim@siva.hindu.god
aeced431e3 Merge siva.hindu.god:/usr/home/tim/m/bk/g51
into  siva.hindu.god:/usr/home/tim/m/bk/51
2006-10-23 23:41:07 -06:00
ramil/ram@myoffice.izhnet.ru
800d80542f Merge mysql.com:/usr/home/ram/work/bug20732/my50-bug20732
into  mysql.com:/usr/home/ram/work/bug20732/my51-bug20732
2006-10-23 10:32:39 +05:00
gkodinov@dl145s.mysql.com
ea8ba03556 Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
2006-10-19 16:00:06 +02:00
gkodinov@dl145s.mysql.com
892495acaf Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-10-19 14:37:49 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
f6ea36c3a5 Merge mysql.com:/usr/home/ram/work/bug20732/my41-bug20732
into  mysql.com:/usr/home/ram/work/bug20732/my50-bug20732
2006-10-19 16:15:30 +05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
0027b6e4b7 Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
We miss some records sometimes using RANGE method if we have
partial key segments.
Example:
  Create table t1(a char(2), key(a(1)));
  insert into t1 values ('a'), ('xx');
  select a from t1 where a > 'x';
We call index_read() passing 'x' key and HA_READ_AFTER_KEY flag
in the handler::read_range_first() wich is wrong because we have
a partial key segment for the field and might miss records like 'xx'.

Fix: don't use open segments in such a case.
2006-10-19 12:52:37 +05:00
jani@ua141d10.elisa.omakaista.fi
8dd0b2d0ae Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
2006-10-17 19:54:44 +03:00
jani@ua141d10.elisa.omakaista.fi
02f29377fd Changed several char* to LEX_STRING*. 2006-10-16 19:57:33 +03:00
petr/cps@mysql.com/owlet.local
6846f8d9c4 Fix for Bug #17544 "Cannot do atomic log rotate",
Bug #21785 "Server crashes after rename of the log table" and
Bug #21966 "Strange warnings on create like/repair of the log
            tables"

According to the patch, from now on, one should use RENAME to
perform a log table rotation (this should also be reflected in
the manual).

Here is a sample:

use mysql;
CREATE TABLE IF NOT EXISTS general_log2 LIKE general_log;
RENAME TABLE general_log TO general_log_backup, general_log2 TO general_log;

The rules for Rename of the log tables are following:
      IF   1. Log tables are enabled
      AND  2. Rename operates on the log table and nothing is being
              renamed to the log table.
      DO   3. Throw an error message.
      ELSE 4. Perform rename.
 
The very RENAME query will go the the old (backup) table. This is
consistent with the behavoiur we have with binlog ROTATE LOGS
statement.

Other problems, which are solved by the patch are:

1) Now REPAIR of the log table is exclusive operation (as it should be), this
   also eliminates lock-related warnings. and
2) CREATE LIKE TABLE now usese usual read lock on the source table rather
   then name lock, which is too restrictive. This way we get rid of another
   log table-related warning, which occured because of the above fact
   (as a side-effect, name lock resulted in a warning).
2006-10-13 17:26:46 +04:00
dli@dev3-76.dev.cn.tlan
01c02f34a9 ndb - fixed for BUG#15021, binlog_index table become inconsistent if errors during purge of binlogs.
if EMFILE error occured while purging binary logs, stop purging logs and report error message to user.
2006-10-13 12:48:05 +08:00
holyfoot/hf@deer.(none)
06978991cc Merge mysql.com:/home/hf/mysql-5.0.mrg
into  mysql.com:/home/hf/mysql-5.1.mrg
2006-10-12 15:42:05 +05:00
holyfoot/hf@mysql.com/deer.(none)
edc9026842 Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/mysql-5.0.mrg
2006-10-12 13:50:22 +05:00
gluh@mysql.com/gluh.(none)
4f553f1d5f Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-kt
2006-10-05 16:38:21 +05:00
svoj@mysql.com/april.(none)
7afbe5f86e Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/svoj/devel/mysql/merge/mysql-4.1-engines
2006-10-02 14:42:12 +05:00
holyfoot/hf@mysql.com/deer.(none)
58d8211822 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/16813/my50-16813
2006-10-01 18:06:07 +05:00
holyfoot/hf@deer.(none)
00629ea17c Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/16813/my51-16813
2006-10-01 16:43:35 +05:00
holyfoot/hf@deer.(none)
b07168bac5 Merge mysql.com:/home/hf/work/16813/my50-16813
into  mysql.com:/home/hf/work/16813/my51-16813
2006-09-29 12:17:33 +05:00
holyfoot/hf@mysql.com/deer.(none)
3474fc9afd bug #16813 (WITH CHECK OPTION fails with UPDATE)
We use the condition from CHECK OPTION twice handling UPDATE command.
First we construnct 'update_cond' AND 'option_cond'
condition to select records to be updated, then we check the
'option_cond' for the updated row.
The problem is that first 'AND' condition is optimized during the 'select'
which can break 'option_cond' structure, so it will be unusable for
the sectond use - to check the updated row.
Possible soultion is either use copy of the condition in the first
use or to make optimization less traumatic for the operands.
I picked the first one.
2006-09-29 12:16:07 +05:00
gluh@mysql.com/gluh.(none)
353c5bd154 after merge fix 2006-09-28 18:00:44 +05:00
gluh@gluh.(none)
b7e59b7085 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.1
2006-09-28 14:09:31 +05:00
gluh@mysql.com/gluh.(none)
437c94317b Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/5.0
2006-09-27 18:06:46 +05:00
gluh@mysql.com/gluh.(none)
a039376c43 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
svoj@mysql.com/april.(none)
c0ebc0fb2a BUG#10974 - No error message if merge table based on union of innodb, memory
Fixed confusing error message from the storage engine when
it fails to open underlying table. The error message is issued
when a table is _opened_ (not when it is created).
2006-09-20 01:40:59 +05:00
brian@zim.(none)
f79ddec1f2 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/home/brian/mysql/merge-5.1
2006-09-15 10:48:30 -07: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
ramil/ram@myoffice.izhnet.ru
8445f3e3de Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/usr/home/ram/work/mysql-5.1-maint
2006-09-15 14:15:09 +05:00
tsmith@maint2.mysql.com
6a31ec2cad Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50
into  maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51
2006-09-13 09:03:52 +02:00
gluh@mysql.com/gluh.(none)
8f44d902bd Bug#20922 mysql removes a name of first column in a table
0xFF is internal separator for SET|ENUM names. 
If this symbol is present in SET|ENUM names then we replace it with 
','(deprecated symbol for SET|ENUM names) during frm creation
and restore to 0xFF during frm opening
2006-09-11 14:50:46 +05:00
gluh@mysql.com/gluh.(none)
76b97433c2 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-merge
into  mysql.com:/home/gluh/MySQL/Merge/5.0
2006-09-07 15:17:46 +05:00
ahristov@bk-internal.mysql.com
75eeececb1 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-runtime
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337
2006-09-06 14:35:27 +02:00
mikael/pappa@dator5.(none)
295d50b23d BUG#21658: Crash partition test in prepared statement protocol
Review fixes
2006-08-31 04:16:22 -04:00
gluh@mysql.com/gluh.(none)
af9895d4c2 Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
2006-08-30 15:56:17 +05:00
mikael/pappa@dator5.(none)
b28a550eb4 Merge dator5.(none):/home/pappa/clean-mysql-5.1-kt
into  dator5.(none):/home/pappa/bug21388
2006-08-26 06:14:05 -04:00
ahristov@bk-internal.mysql.com
71bb7e590d Merge bk-internal.mysql.com:/data0/bk/mysql-5.1-runtime
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337
2006-08-23 17:50:56 +02:00
petr/cps@owlet.local
2763504be4 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
2006-08-23 16:48:39 +04:00
mikael/pappa@dator5.(none)
eaf68858ce BUG#21658: Crash when creating table with item in prepared statement that allocates memory in fix_fields
We need to use an arena to indicate we are preparing a statement when loading partition function and
parsing it as part of an open table.
2006-08-22 16:52:25 -04:00
dlenev@mockturtle.local
8fb55ff0cf Fix for bug#19403/12212 "Crash that happens during removing of database name
from cache" and #21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes
server to crash".

Crash happened when one ran DROP DATABASE or SHOW OPEN TABLES statements
while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE
or any other command that takes name-lock) in other connection.

This problem was caused by the fact that table placeholders which were
added to table cache in order to obtain name-lock on table had
TABLE_SHARE::db and table_name set to 0. Therefore they broke assumption
that these members are non-0 for all tables in table cache on which some
of our code relies.

The fix sets these members for such placeholders to appropriate value making
this assumption true again. As attempt to avoid such problems in future
we introduce auxiliary TABLE_SHARE::set_table_cache_key() methods which
should be used when one wants to set TABLE_SHARE::table_cache_key and which
ensure that TABLE_SHARE::table_name/db are set properly.

Test cases for these bugs were added to 5.0 test-suite (with 5.0-specific
fix for bug #21216).
2006-08-21 19:02:11 +04:00
andrey@example.com
5d626c5c9a WL#3337 (Event scheduler new architecture)
Post-review fixes. Mostly whitespace, int-to-bool return value, fixed comments
2006-08-17 14:22:59 +02:00
gluh@mysql.com/gluh.(none)
a9b18171ec Bug#20871 Partitions: crash if --skip-innodb
return error if engine is disabled
2006-08-16 20:07:12 +05:00
kostja@bodhi.local
9b05865be4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-08-14 16:30:57 +04:00
kostja@bodhi.local
04c97488f9 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-08-12 21:06:51 +04:00
patg@govinda.patg.net
4371749996 Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.1
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
2006-08-10 14:28:39 -07:00
evgen@moonbone.local
2e7f47c6f8 sql_base.cc, table.cc:
After merge fix
2006-08-10 00:37:08 +04:00
evgen@sunlight.local
0d6996010c Merge sunlight.local:/local_work/leak_fix_orig
into  sunlight.local:/local_work/leak_fix-5.1-mysql
2006-08-09 02:49:29 +04:00
evgen@sunlight.local
b5a5cb4ad7 Merge sunlight.local:/home/evgen/bk-trees/mysql-5.0
into  sunlight.local:/local_work/leak_fix
2006-08-09 01:43:11 +04:00
evgen@sunlight.local
1250b06ac9 sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc:
Correct memory leak fix
2006-08-09 00:05:42 +04:00
ingo/istruewing@chilla.local
c20030ef26 Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-bug18775
2006-08-02 18:10:51 +02:00
ingo/istruewing@chilla.local
8e4c36ad4a Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)

The intermediate (not temporary) files of the new table
during ALTER TABLE was visible for SHOW TABLES. These
intermediate files are copies of the original table with
the changes done by ALTER TABLE. After all the data is
copied over from the original table, these files are renamed 
to the original tables file names. So they are not temporary 
files. They persist after ALTER TABLE, but just with another 
name.

In 5.0 the intermediate files are invisible for SHOW TABLES
because all file names beginning with "#sql" were suppressed.

This failed since 5.1.6 because even temporary table names were
converted when making file names from them. The prefix became
converted to "@0023sql". Converting the prefix during SHOW TABLES
would suppress the listing of user tables that start with "#sql".

The solution of the problem is to continue the implementation of
the table name to file name conversion feature. One requirement
is to suppress the conversion for temporary table names.

This change is straightforward for real temporary tables as there
is a function that creates temporary file names.

But the generated path names are located in TMPDIR and have no
relation to the internal table name. This cannot be used for
ALTER TABLE. Its intermediate files need to be in the same
directory as the old table files. And it is necessary to be
able to deduce the same path from the same table name repeatedly.

Consequently the intermediate table files must be handled like normal
tables. Their internal names shall start with tmp_file_prefix
(#sql) and they shall not be converted like normal table names.

I added a flags parameter to all relevant functions that are
called from ALTER TABLE. It is used to suppress the conversion
for the intermediate table files.

The outcome is that the suppression of #sql in SHOW TABLES
works again. It does not suppress user tables as these are
converted to @0023sql on file level.

This patch does also fix ALTER TABLE ... RENAME, which could not 
rename a table with non-ASCII characters in its name.

It does also fix the problem that a user could create a table like
`#sql-xxxx-yyyy`, where xxxx is mysqld's pid and yyyy is the thread
ID of some other thread, which prevented this thread from running 
ALTER TABLE.

Some of the above problems are mentioned in Bug 1405, which can
be closed with this patch.

This patch does also contain some minor fixes for other forgotten
conversions. Still known problems are reported as bugs 21370,
21373, and 21387.
2006-08-02 17:57:06 +02:00
jimw@rama.(none)
f7e19b40f3 Merge rama.(none):/home/jimw/my/tmp_merge
into  rama.(none):/home/jimw/my/mysql-5.1-clean
2006-07-28 15:51:48 -07:00
gluh@myoffice.izhnet.ru
f76aec6d90 Merge myoffice.izhnet.ru:/usr/home/gluh/MySQL/tmp_merge
into  myoffice.izhnet.ru:/usr/home/gluh/MySQL/5.1
2006-07-18 18:43:55 +05:00
igreenhoe/greenman@anubis.greendragongames.com
b170112cae 4.1 -> 5.0 merge fixes 2006-07-14 05:56:30 -07:00
igreenhoe/greenman@anubis.greendragongames.com
abb75129f8 4.1 -> 5.0 merge 2006-07-13 16:35:25 -07:00
kostja@bodhi.local
56353959e7 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-07-13 00:18:59 +04:00
kostja@bodhi.local
15a76619c7 Post-merge fixes for Bug#19399 "Stored Procedures 'Lost Connection'
when dropping/creating tables"
2006-07-11 23:39:51 +04:00
kostja@bodhi.local
e4598dae1f Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-11 21:19:57 +04:00
konstantin@bodhi.netgear
0db71aaf98 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.netgear:/opt/local/work/mysql-4.1-19399
2006-07-07 00:01:05 +04:00
konstantin@bodhi.netgear
8e735d2c11 A fix and a test case for Bug#19399 "res 'Lost Connection' when
dropping/creating tables".

The bug could lead to a crash when multi-delete statements were
prepared and used with temporary tables.

The bug was caused by lack of clean-up of multi-delete tables before
re-execution of a prepared statement. In a statement like
DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is
moved to lex->auxilliary_table_list and excluded from lex->query_tables
or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use
and not cleaned up before re-execution of a prepared statement.
2006-07-06 23:59:04 +04:00
ingo@chilla.local
8ef4970650 After merge fix. 2006-07-06 20:12:33 +02:00
ingo@chilla.local
591d461d95 Merge chilla.local:/home/mydev/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-bug16218
2006-07-06 19:36:07 +02:00
dlenev@mysql.com
d6f47c31b6 After merge fixes for patch solving bug#18437 "Wrong values inserted with a
before update trigger on NDB table".

Two main changes:
- We use TABLE::read_set/write_set bitmaps for marking fields used by
  statement instead of Field::query_id in 5.1.
- Now when we mark columns used by statement we take into account columns 
  used by table's triggers instead of marking all columns as used if table
  has triggers.
2006-07-06 13:33:23 +04:00
gluh@mysql.com
d2b378d57f Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt
2006-07-03 13:19:18 +05:00
evgen@moonbone.local
1459784aba Reverted wrong bug fix (Bug#11228) 2006-07-01 01:37:20 +04:00
monty@mysql.com
2f86009c9e Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2006-06-30 19:15:18 +03:00
monty@mysql.com
2bec1b86bb Reverted wrong bug fix (Bug#11228) 2006-06-30 18:29:27 +03:00
gluh@eagle.intranet.mysql.r18.ru
a230166f28 Fix for bug#13934 Silent truncation of table comments
Table comment: issue a warning(error in traditional mode) if length of comment > 60 symbols
Column comment: issue a warning(error in traditional mode) if length of comment > 255 symbols
Table 'comment' is changed from char* to LEX_STRING
2006-06-29 18:39:34 +05:00
evgen@moonbone.local
82369c4e65 Manual merge 2006-06-28 19:34:04 +04:00
ingo@mysql.com
8728fbbc6c Bug#16218 - Crash on insert delayed
Bug#17294 - INSERT DELAYED puting an \n before data
Bug#16611 - INSERT DELAYED corrupts data
Bug#13707 - Server crash with INSERT DELAYED on MyISAM table
Combined as Bug#16218.

INSERT DELAYED crashed in 5.0 on a table with a varchar that 
could be NULL and was created pre-5.0 (Bugs 16218 and 13707).
INSERT DELAYED corrupted data in 5.0 on a table with varchar 
fields that was created pre-5.0 (Bugs 17294 and 16611).

In case of INSERT DELAYED the open table is copied from the
delayed insert thread to be able to create a record for the 
queue. When copying the fields, a method was used that did 
convert old varchar to new varchar fields and did not set up 
some pointers into the record buffer of the table.

The field conversion was guilty for the misinterpretation of 
the record contents by the delayed insert thread. The wrong
pointer setup was guilty for the crashes.

For Bug 13707 (Server crash with INSERT DELAYED on MyISAM table)
I fixed the above mentioned method to set up one of the pointers.
For Bug 16218 I set up the other pointers too.

But when looking at the corruptions I got aware that converting
the field type was totally wrong for INSERT DELAYED. The copied
table is used to create a record that is to be sent to the
delayed insert thread. Of course it can interpret the record
correctly only if all field types are the same in both table
objects.

So I revoked the fix for Bug 13707 and changed the new_field() 
method so that it can suppress conversions.

No test case as this is a migration problem. One needs to
create a table with 4.x and use it with 5.x. I added two
test scripts to the bug report.
2006-06-26 20:57:18 +02:00
elliot@mysql.com
374495ffd1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/data0/bk/mysql-5.0-maint
2006-06-26 04:48:16 +02:00
iggy@mysql.com
f68b01e347 Bug#20616: drop_temp_table test fails on Windows platform 2006-06-23 12:15:39 -04:00
evgen@moonbone.local
9a9224da68 Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-06-23 14:53:41 +04:00
bar@mysql.com
cfb08851f7 Bug#11228: DESC shows arbitrary column as "PRI"
An UNIQUE KEY consisting of NOT NULL columns
  was displayed as PRIMARY KEY in "DESC t1".
  According to the code, that was intentional
  behaviour for some reasons unknown to me.
  This code was written before bitkeeper time,
  so I cannot check who and why made this.
  After discussing on dev-public, a decision
  was made to remove this code
2006-06-23 13:19:30 +05:00
mikael@dator5.(none)
32c25c8e2f BUG#16000: .par file not removed plus errors to error log for normal errors 2006-06-20 13:24:30 -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
monty@mysql.com
a703ff60c7 Fixed some issues found by valgrind
(one testcase, one memory leak and some accesses to not initialized memory)
2006-06-06 02:47:30 +03:00
monty@mysql.com
c46fb742b8 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1
2006-06-04 21:05:22 +03:00
monty@mysql.com
74cc73d461 This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.
2006-06-04 18:52:22 +03:00
anna@hasky.mysql.fi
16a31b390b Merge anna@bk-internal.mysql.com:/home/bk/mysql-5.0
into  hasky.mysql.fi:/home/anjuta/my/mysql-5.0-clean
2006-06-02 22:31:51 +03:00
jani@ua141d10.elisa.omakaista.fi
dea377fafc Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new-marvel
2006-06-01 20:39:12 +03:00
anjuta@arthur.local
5459ebc572 Fixed Bug#19479:mysqldump creates invalid dump.
Only check for FN_DEVCHAR in filenames if FN_DEVCHAR is defined.
This allows to use table names with ":" on non windows platforms.
On Windows platform get an error if you use table name that contains FN_DEVCHAR
2006-06-01 12:34:44 +03:00
serg@serg.mylan
b214937fde reduce error log spamming by old privilege tables. If they're old,
report it once, don't whine about every missing column.
2006-05-30 18:18:13 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
c81b4c01bf Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2006-05-30 16:07:49 +03:00
gkodinov@mysql.com
b6acee915a Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B18681
2006-05-26 11:57:56 +03:00
gkodinov@mysql.com
59837f7a5b Bug #14875: Bad view DEFINER makes SHOW CREATE VIEW fail
When reading a view definition from a .frm file it was
throwing a SQL error if the DEFINER user is not defined.
Changed it to a warning to match the (documented) case
when a view with undefined DEFINER user is created.
2006-05-26 11:49:39 +03:00
gkodinov@mysql.com
a21a2b5bcd BUG#18681: View privileges are broken
The check for view security was lacking several points :
1. Check with the right set of permissions : for each table ref that
participates in a view there were the right credentials to use in it's
security_ctx member, but these weren't used for checking the credentials.
This makes hard enforcing the SQL SECURITY DEFINER|INVOKER property
consistently.
2. Because of the above the security checking for views was just ruled out
in explicit ways in several places.
3. The security was checked only for the columns of the tables that are
brought into the query from a view. So if there is no column reference
outside of the view definition it was not detecting the lack of access to
the tables in the view in SQL SECURITY INVOKER mode.

The fix below tries to fix the above 3 points.
2006-05-26 11:47:53 +03:00
andrey@lmy004.
3ced49d2f6 manual merged 2006-05-22 21:57:23 +02:00
andrey@lmy004.
b429d73d62 fix for bug #17619 Scheduler race conditions
- Scheduler is either initialized at server start or never.
  Starting & stopping is now suspending & resuming.
- The scheduler has clear OO interface
- Now all calls to the scheduler are synchronous
- GLOBAL event_scheduler uses thd::sys_var_tmp (see set_var.cc)
- External API is encapsulated into class Events
- Includes fixes for all comments of Kostja's review of 19.05.2005

Starting to merge into 5.1-release (5.1.10) and push
2006-05-22 20:46:13 +02:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
c85be97f50 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/bug19010
2006-05-12 12:22:31 -04:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
56b97747de BUG#19010: Fix issues with that ALTER TABLE from auto-partitioned NDB table doesn't work unless primary key exists on table. 2006-05-10 12:53:40 -04:00
monty@mysql.com
343644dd5d Added support for key_block_size for key and table level (WL#602)
Added support for key_block_size to MyISAM.
Simplify interface to 'new Key' to make it easier to add new key options.
mysqld option --new is used to define where key options are printed.
(In 5.3 we should move all key options to after key part definition to avoid problem with reserved names)
Fixed some compiler warnings and a memory leak in ssl
2006-05-03 15:59:17 +03:00
mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se
09e95da616 Merge c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-04-19 21:22:35 -04:00
mikael@c-4909e253.1238-1-64736c10.cust.bredbandsbolaget.se
cef06fdb61 BUG#16002: Make partition functions that are unsigned work properly 2006-04-17 22:51:34 -04:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
8ae26a2868 WL 2826: Error handling of ALTER TABLE for partitioning
After review changes
2006-04-15 21:49:13 -04:00
serg@serg.mylan
c708c11633 fixed reading of free'd memory when opening a table with non-existing plugin 2006-04-06 15:49:00 +02:00
mikael@c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se
0a02cbb5f6 Merge c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/clean-mysql-5.1-new
into  c-4908e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-04-01 16:31:53 -05: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
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
f8088c1804 WL 2826: Error handling of ALTER TABLE for partitioning
Loads of review comments fixed
inactivate => deactivate
table log => ddl log
Commented on Error Inject Module added
Put various #defines into enums
Fixed abort_and_upgrade_lock, removed unnecessary parameter
Fixed mysqlish method intro's
Fixed warning statements
5.1.7 was released still with partition states in clear text

Fixed io_size bug
Fixed bug in open that TRUNCATED before reading :)
file_entry => file_entry_buf
Don't open DDL log until first write call to DDL log
handler_type => handler_name
no => num
2006-03-24 18:19:13 -05:00
bar@mysql.com
d735a60964 Merge mysql.com:/usr/home/bar/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.1-new
2006-03-22 15:10:42 +04:00
bar@mysql.com
cab060d2e2 Merge mysql.com:/usr/home/bar/mysql-4.1.b18004
into  mysql.com:/usr/home/bar/mysql-5.0
2006-03-22 13:11:31 +04:00
pappa@c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se
3dc4635c70 Merge c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1-new
into  c-8808e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-03-21 10:44:59 -05:00
bar@mysql.com
33e446b356 Bug#18004 Connecting crashes server when default charset is UCS2
table.cc:
  Fixing to use system_charset_info instead of default_charset_info.
  Crash happened because the "ctype" array is empty in UCS2,
  and thus cannot be used with my_isspace().
  The reason why UCS2 appeared in this context was because of
  of default_charset_info variable incorrectly substituted to my_isspace().
  As functions check_db_name(), check_table_name() and check_column_name()
  always get values in utf8, system_charset_info must be used instead.
ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result:
  new file
2006-03-20 14:43:02 +04:00
mats@mysql.com
4440b71dda Bug#18280 (RBR: Extreneous maps when writing to general_log and slow_log):
Filter out replication general_log and slow_log entirely from binary
log. Caching result of table share-specific tests.
2006-03-17 18:11:07 +01:00
mats@mysql.com
90215eb387 WL#3023 (Use locks in statement-like manner):
Post-merge patches.
2006-03-09 03:56:14 +01:00
bar@mysql.com
23332d0d95 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/usr/home/bar/mysql-5.1-new.b17142
2006-03-07 13:07:23 +04:00
bar@mysql.com
02023859bf Bug#17142 Crash if create with encoded name
upgrade.result, upgrade.test:
  Adding test case.
table.cc:
  Don't try to open a table with old-formatted name,
  if the table name contains "@" character.
  This is to avoid mixing two different names to each other.
  Thanks Monty for suggesting this fix.
2006-03-07 13:05:24 +04:00
pem@mysql.com
a065843799 Merge mysql.com:/extern/mysql/5.0/generic/mysql-5.0
into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
2006-03-06 19:46:17 +01:00
timour@mysql.com
593bd1d3b8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-15229
2006-03-06 11:41:19 +02:00
pem@mysql.com
015ab71a50 Merge mysql.com:/extern/mysql/5.0/bug17476/mysql-5.0
into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
2006-03-03 12:03:27 +01:00
timour@mysql.com
103604ed06 Fix for BUG#15229.
The cause of this bug was a design flaw due to which the list of natural
join columns was incorrectly computed and stored for nested joins that
are not natural joins, but are operands (possibly indirect) of nested joins.

The patch corrects the flaw in a such a way, that the result columns of a
table reference are materialized only if it is a leaf table (that is, only
if it is a view, stored table, or natural/using join).
2006-03-02 11:50:15 +02:00
mats@mysql.com
5dab541c3a Bug#17181 (mysqlslap test server crash):
Moving assignments to table_map_id for thread-safe handling of
  table shares.
2006-02-23 13:34:03 +01:00
timour@mysql.com
465745a200 Fix for BUG#17523: natural join and information schema.
The cause of the bug was an ASSERT that checked the consistency
of TABLE_SHARE::db and TABLE_LIST::db and failed for I_S tables.
The fix relaxes the requirement for consistency for I_S.
2006-02-22 10:04:10 +02:00
pappa@c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se
dd17f48630 Merge c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1-bugs
into  c-9a08e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/wl2826
2006-02-20 16:41:46 -05:00
andrey@lmy004.
e9af8c1d83 post-merge fixes of bug 16548 2006-02-14 20:10:51 +01:00
andrey@lmy004.
d5d11a9c23 manual merge 2006-02-14 17:05:36 +01:00
andrey@lmy004.
815927e590 - final fixes for bug#16431 (Events: An event which alters itself disappears)
- fix for bug#16423 (Events: SHOW CREATE EVENT doesn't work)
- this Changeset commits makes CREATE/UPDATE/DELETE EVENT real DDL statements
  by committing the currently open transaction before they are executed.
- this Changeset also fixes a trailing space problem since the very early days
  of the internal cron
- adds sophisticated checking of whether mysql.event was tampered accidentally
  or with purpose by an user.
- adds a lot of inline function documentation - documents everything left
  uncodumented
- INTERVAL_XXXX to XXX in I_S.EVENTS.INTERVAL_FIELD

WL#1034 (Internal CRON)
2006-02-14 16:20:48 +01:00
brian@zim.tangent.org
eeefb8ba7c Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.tangent.org:/home/brian/raid/mysql-5.1-new
2006-02-11 17:26:32 -08:00
brian@zim.tangent.org
9485856f1a This patch is to further remove the RAID code. We removed support for people creating tables with RAID. This patch remove most of the source for this. 2006-02-11 17:21:01 -08:00
pappa@c-5c0be253.1238-1-64736c10.cust.bredbandsbolaget.se
da5713e486 WL #2826: Sixth step, made it work with test cases 2006-02-03 12:05:29 -05:00
konstantin@mysql.com
92b41ba92a Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-02 16:57:34 +03:00
mikron@mikael-ronstr-ms-dator.local
954dacfc28 WL 2826: Fourth step
Remove partition state from frm file
Ensure we can still load tables created in 5.1.6 for the time
being
2006-02-01 17:05:22 +01:00
msvensson@neptunus.(none)
50925ab573 Merge bk-internal:/home/bk/mysql-5.1-new
into  neptunus.(none):/home/msvensson/mysql/bug15020/my51-bug15020
2006-01-24 17:46:13 +01:00
bar@mysql.com
aeebffc96b table.cc:
Try to open an old 5.0 table name
  if encoded name doesn't exist.
  This makes SELECT working without having
  to rename tables with tricky characters
  in name into 5.1 format (simpliefies upgrade).
2006-01-24 17:33:39 +04:00
msvensson@neptunus.(none)
810ceefdf9 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/bug15020/my51-bug15020
2006-01-24 10:31:41 +01:00
knielsen@mysql.com
c346208a40 Portability compilation fixes. 2006-01-20 13:23:24 +01:00
msvensson@neptunus.(none)
a5de6fbdbe Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/bug15020/my51-bug15020
2006-01-19 15:05:58 +01:00
msvensson@neptunus.(none)
78037e8056 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug15020/my50-bug15020
2006-01-19 12:12:47 +01:00
msvensson@neptunus.(none)
96b1f9150c Merge neptunus.(none):/home/msvensson/mysql/bug15020/my50-bug15020
into  neptunus.(none):/home/msvensson/mysql/bug15020/my51-bug15020
2006-01-19 11:43:19 +01:00
msvensson@neptunus.(none)
199d800942 Bug#15020 "Can't find files" message incorrect for error 24 2006-01-19 11:35:27 +01:00
cps@outpost.site
ce2eb6d8cb WL1019: complete patch. Reapplied patch to the clean
tree to get rid of multiple typos in CS comments and
unify the patch.
2006-01-19 05:56:06 +03:00
mikron@c-1e0be253.1238-1-64736c10.cust.bredbandsbolaget.se
e802a94284 WL #2604: Partition Management
Optimised version of ADD/DROP/REORGANIZE partitions for
non-NDB storage engines.
New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions
Quite a few bug fixes
2006-01-17 08:40:00 +01:00
andrey@lmy004.
7c049782fa WL #1034 (Internal CRON)
merge before push
2006-01-10 21:02:19 +01:00
serg@serg.mylan
14f94dc0ca many warnings (practically safe but annoying) corrected 2006-01-03 17:54:54 +01:00
bar@mysql.com
ce1f07078e Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/usr/home/bar/mysql-5.1-new.fscs3
2005-12-31 09:02:56 +04:00
bar@mysql.com
6ff211329f WL#1324 table name to file name encoding
- Encoding itself, implemented as a charset
  "filename". Originally planned to use '.'
  as an escape character, but now changed to '@'
  for two reasons: "ls" does not return
  file names starting with '.' considering them
  as a kind of hidden files; some platforms
  do not allow several dots in a file name.
- replacing many calls of my_snprintf() and
  strnxmov() to the new build_table_filename().
- Adding MY_APPEND_EXT mysys flag, to append
  an extention rather that replace it.
- Replacing all numeric constants in fn_format
  flag arguments to their mysys definitions, e.g.
  MY_UNPACK_FILENAME,
- Predictability in several function/methods:
  when a table name can appear with or withot .frm
  extension. Some functions/methods were changed
  so accept names strictly with .frm, other - strictly
  without .frm extensions. Several DBUG_ASSERTs were
  added to check whether an extension is passed.
Many files:
  table name to file name encoding
mysql_priv.h:
  Prototypes for new table name encoding tools.
ctype-utf8.c:
  Implementing "filename" charset for
  table name to file name encoding.
row0mysql.c:
  Fixing table name prefix.
mf_format.c:
  Adding MY_APPEND_EXT processing.
Many files:
  Fixing tests.
my_sys.h:
  Adding new flag to append rather than replace an extension.
m_ctype.h:
  Adding "filename" charset definition.
2005-12-31 09:01:26 +04:00
svoj@april.(none)
c0c5b1ac84 BUG#16068: Plugin related bugs
Fixed that --plugin_dir option doesn't work.
Fixed that parser name is not restored correctly from the table.
2005-12-29 17:28:59 +04:00
lars@mysql.com
ad126d90e0 WL#1012: All changes as one single changeset.
This includes both code and test cases.
2005-12-22 06:39:02 +01:00
acurtis@xiphis.org
9d4d1e81b8 Merge xiphis.org:/home/antony/work2/mysql-5.1
into  xiphis.org:/home/antony/work3/mysql-5.1-plugable-2
2005-12-21 10:26:39 -08:00
acurtis@xiphis.org
13a776778c Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code
2005-12-21 10:18:40 -08:00
joerg@trift-lap.fambruehe
7e36dc1cc6 Merge joerg@trift2:/M50/part2-ramil
into trift-lap.fambruehe:/MySQL/M51/merge-5.1
2005-12-14 23:05:08 +01:00
andrey@lmy004.
fd0613f59e Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-wl1034
into lmy004.:/work/mysql-5.1-tt-copy-works
2005-12-14 12:15:48 +01:00
ramil@mysql.com
8eba6be5b7 Fix for bug #15602: 5.0.17 test case 'create' failure. 2005-12-09 19:55:59 +04:00
timour@mysql.com
3d01a3affc Merge mysql.com:/home/timka/mysql/src/5.0-2486
into  mysql.com:/home/timka/mysql/src/5.1-dbg
2005-12-07 10:47:43 +02:00
timour@mysql.com
6d6b617a2e Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-12-06 18:04:26 +02:00
andrey@lmy004.
a370c2d907 WL1034 update for latest 5.1 sources 2005-12-02 13:07:02 +01:00
jimw@mysql.com
0538845963 Merge mysql.com:/home/jimw/my/mysql-5.1-release
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-11-30 13:51:23 -08:00
timour@mysql.com
687b66b8da WL#2486 - natural/using joins according to SQL:2003
Post-review fixes that simplify the way access rights
are checked during name resolution and factor out all
entry points to check access rights into one single
function.
2005-11-30 21:27:11 +02:00
knielsen@mysql.com
0da7c25528 Fix byte * vs. char * mismatches that break Win32 compilation. 2005-11-29 09:07:21 +01:00
bar@mysql.com
23c4c3abc0 Merge mysql.com:/usr/home/bar/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.1-new
2005-11-29 09:30:29 +04:00
timour@mysql.com
cc7d1268c4 WL#2486 - Natural/using join according to SQL:2003.
Post-review fixes according to Monty's review.
2005-11-28 21:57:50 +02:00
pem@mysql.com
b2a9961abf Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new
2005-11-28 20:14:12 +01:00
jimw@mysql.com
99297e44d4 Merge mysql.com:/home/jimw/my/mysql-4.1-14155
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-11-28 10:50:23 -08:00
konstantin@mysql.com
9fd6204ad1 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-11-25 13:57:13 +03:00
konstantin@mysql.com
f57dffe453 A fix and a test case for Bug#14410 "Crash in Enum or Set type in
CREATE TABLE and PS/SP": make sure that 'typelib' object for
ENUM values and 'Item_string' object for DEFAULT clause are 
created in the statement memory root.
2005-11-25 13:25:31 +03:00
knielsen@mysql.com
4719923781 Mikaels fix for compiling without partition storage engine 2005-11-25 10:33:38 +01:00
jimw@mysql.com
81cb8ad37d Fix handling of maximum value for MAX_ROWS on 64-bit platforms. (Bug #14155) 2005-11-23 17:05:59 -08:00
monty@mysql.com
4575a662cb Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC
2005-11-23 22:58:53 +02:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
5273071265 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2005-11-23 14:57:00 +02: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
acurtis@poseidon.ndb.mysql.com
c01a3b5e5f Make storage engines "pluggable", handlerton work 2005-11-07 16:25:06 +01:00
svoj@poseidon.ndb.mysql.com
463811e900 monty review: fixes after reapplying plugin patch from "crashed" 5.1 tree 2005-11-06 14:26:37 +01:00
svoj@poseidon.ndb.mysql.com
3791197f0d WL#2575 - Fulltext: Parser plugin for FTS
WL#2763 - MySQL plugin interface: step 1
Manual merge from CNET tree.
2005-11-06 13:13:06 +01:00
monty@mysql.com
cdf64f0f57 Fix of crashed 5.1 tree (wrong merge + wrong pullout patch forced us to create a new 5.1 tree)
This is a merge of 5.0 -> 5.1 + some code from old 5.1 tree to get all tests to work and keep the .frm format the same as the old 5.1 tree.
2005-11-05 13:20:35 +02:00
monty@mysql.com
a6f5375cb0 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1
2005-11-05 01:32:55 +02:00
jani@ua141d10.elisa.omakaista.fi
0f83ba137a Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
2005-11-03 16:43:05 +02:00
jani@ua141d10.elisa.omakaista.fi
0ee589b4d6 Changes in get_table_type() and mysql_frm_type(). The main problem was
that in mysql_rm_table_part2_with_lock() previously we needed to open
same file twice. Now once is enough.
2005-11-03 16:10:11 +02:00
konstantin@mysql.com
7e3f757f2d A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.
2005-11-03 14:20:13 +03:00
monty@mysql.com
65034c9fb2 Merge monty@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/my/mysql-5.0
2005-11-02 16:29:00 +02:00
bell@sanja.is.com.ua
efbdd24c96 found problem removed 2005-11-02 15:17:57 +02:00
bell@sanja.is.com.ua
35cc6325a7 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner-5.0
2005-11-02 12:56:19 +02:00
monty@mysql.com
3a072a0eef Added missing DBUG_ENTER (bug in last push) 2005-11-01 21:59:24 +02:00
monty@mysql.com
f10399d77e Add missing return
Compile max with --yassl instead of --with-openssl
2005-11-01 21:57:24 +02:00
monty@mysql.com
e5f48e13bf Reverting patch for BUG #14009 (use of abs() on null value causes problems with filesort
Fix for bug #14536: SELECT @a,@a:=... fails with prepared statements
2005-11-01 15:54:30 +02:00
bell@sanja.is.com.ua
c54d129224 postreview fixes 2005-10-31 22:14:27 +02:00
bell@sanja.is.com.ua
c399932a72 fixe of typos, comments & layout 2005-10-28 00:56:44 +03:00
bell@sanja.is.com.ua
1b164c7b83 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
monty@mysql.com
49a30ef513 Fixes during review of new pushed code 2005-10-13 19:40:46 +03:00
monty@mysql.com
5513ab69b7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-12 00:59:52 +03:00
svoj@mysql.com
83043c3c83 Always save/restore connect string. 2005-10-10 23:53:53 +05:00
svoj@mysql.com
eb8ab30046 Store and read engine type string in extra block of .frm. 2005-10-10 23:01:45 +05:00
monty@mysql.com
17d7ba931d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-08 03:37:23 +03:00
monty@mysql.com
78e828d32f Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code
2005-10-06 17:54:43 +03:00
tomas@poseidon.ndb.mysql.com
620b7bafb0 Merge 2005-10-06 10:54:07 +02:00
serg@serg.mylan
84859c3895 Merge mysqldev@production.mysql.com:/data0/mysqldev/my/mysql-5.0-release
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-10-04 18:10:38 +02:00
serg@mysql.com
062f145bf8 sql_table.cc, table.cc, table.h:
fixed CHECKSUM TABLE to be independent from last - undefined in InnoDB - bits in the null bitmask
  bug#13710
2005-10-04 17:04:20 +02:00
timour@mysql.com
233e68e205 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-13410
2005-10-03 22:02:22 +03:00
timour@mysql.com
77cf84186e Fix for BUG#13410 - qualified reference to a view column in the HAVING clause cannot be resolved.
The problem was then when a column reference was resolved to a view column, the new Item
created for this column contained the name of the view, and not the view alias.
2005-10-01 09:35:30 +03:00
timour@mysql.com
638198e17d Fix for BUG#13597 - columns in ON condition not resolved if references a table in a nested right join.
The problem was in that when finding the last table reference in a nested join tree,
the procedure doing the iteration over the right-most branches of a join tree
was testing for RIGHT JOINs the table reference that represents the join, and not
the second operand of the JOIN. Currently the information whether a join is LEFT/RIGHT
is stored not on the join object itself, but on one of its operands.
2005-09-30 10:39:17 +03:00
konstantin@mysql.com
2d4c54ba1b Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-09-23 00:46:59 +04:00
konstantin@mysql.com
6f8d3c4844 A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
2005-09-22 02:11:21 +04:00
pappa@c-1309e253.1238-1-64736c10.cust.bredbandsbolaget.se
2530fcde11 Handle default engine type better for
partitioned tables
2005-09-20 10:29:59 -04:00
tulin@dl145b.mysql.com
c753d587ca Corrected last fix for
Bug #13152 bit fields and fields that follow become corrupted when dumped from NDB tables
2005-09-19 15:52:57 +02:00
reggie@fedora.(none)
66e6453e2a some last minute Windows compile fixes and makefile corrections 2005-09-15 14:32:01 -05:00
tulin@dl145c.mysql.com
5cc8f58ced Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1
2005-09-14 14:42:20 +02:00
tulin@dl145c.mysql.com
ee39253467 indentation correction 2005-09-14 13:44:44 +02:00
tulin@dl145c.mysql.com
80da104ea5 merge 2005-09-14 13:37:52 +02:00
tulin@dl145c.mysql.com
1b5eb117f5 (corrected typo in prev patch) Bug #13152 bit fields and fileds that follow become corrupted when dumped from NDB 2005-09-14 13:24:41 +02:00
tulin@dl145c.mysql.com
415ec2bf89 Bug #13152 bit fields and fileds that follow become corrupted when dumped from NDB tables 2005-09-14 11:41:36 +02:00
msvensson@neptunus.(none)
fb63290635 Merge neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my51-bug10713_new
2005-09-14 09:43:56 +02:00
eric@mysql.com
1a79e25537 Made changes to add federated CONNECTION information to the .frm file
(per Monty's patch).
Remove references to the "COMMENT" field.
WL#2414
2005-09-12 18:02:17 -07:00
ndbdev@dl145c.mysql.com
f40c1576b0 Merge 2005-09-06 09:20:15 +02:00
bell@sanja.is.com.ua
8553349638 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-09-02 17:06:15 +03:00
konstantin@mysql.com
a3ddcdf8fb Rename:
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed 
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to 
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
2005-09-02 17:21:19 +04:00
pappa@c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se
02056f8e3a Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-25 13:11:38 -04:00
bell@sanja.is.com.ua
144c847da6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-08-23 23:17:36 +03:00
timour@mysql.com
bf8563ae1d Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-08-23 18:15:51 +03:00
timour@mysql.com
e040300393 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without.
2005-08-23 18:08:04 +03:00
monty@mishka.local
d62295e44e Cleanup during review of new pushed code 2005-08-22 01:13:37 +03:00
timour@mysql.com
f5fc1543aa WL#2486 - natural and using join according to SQL:2003
- Corrected problem with N-way nested natural joins in PS mode.
- Code cleanup
- More asserts to check consistency of name resolution contexts
- Fixed potential memory leak of name resolution contexts
2005-08-19 15:22:30 +03:00
timour@mysql.com
76cacf4522 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486
2005-08-18 11:29:29 +03:00
timour@mysql.com
f31f5eabc7 WL#2486 - natural and using join
Fixed debug printout.
2005-08-18 11:28:50 +03:00
timour@mysql.com
8d975efc72 WL#2486 - natural and using join according to SQL:2003
- Fixed minor error after Monty's review.
2005-08-18 11:24:59 +03:00
monty@mysql.com
3eaa953529 Cleanups and optimization during review of new code 2005-08-18 03:12:42 +03:00
sanja@hasky.mysql.fi
562786bc36 table.cc:
remove unneeded multitable_view assignment
sql_view.cc:
  fix potential memorry overrun in ref_array
  asssign multitable_view in time of view creation (BUG#12569)
2005-08-13 17:06:30 +03:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03:00
pappa@c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
69acde961f Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0
into  c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
2005-08-05 18:01:34 -04:00
bell@sanja.is.com.ua
4c69fbe632 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
e59360ac86 Review of new code:
Change argument order to be database, tablename for some functions
2005-07-27 13:05:30 +03:00
jimw@mysql.com
d6d1a9aae2 Merge mysql.com:/home/jimw/my/mysql-5.0-11227
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-22 12:39:47 -07:00
jimw@mysql.com
49e5636410 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-22 12:35:15 -07:00
jimw@mysql.com
6eae678f56 Fix error message generated when trying to create a table in a
non-existent database. (Bug #10407)
2005-07-21 20:08:54 -07:00
mronstrom@mysql.com
67087e2aa7 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
tomas@poseidon.ndb.mysql.com
674b6bb151 Merge 2005-07-12 20:01:22 +02:00