Commit graph

16409 commits

Author SHA1 Message Date
evgen@sunlight.local
629aa8071d sql_base.cc:
Post fix for bug#25122.
2007-03-02 13:25:41 +03:00
gkodinov/kgeorge@magare.gmz
4a6efcd664 Bug #26537: item_unhex() was not expected
to return NULL for non-NULL arguments.
This is not the case as it can return NULL
for invalid hexidecimal strings.
Fixed by setting the maybe_null flag.
2007-03-02 12:14:50 +02:00
malff/marcsql@weblab.(none)
2b1a04e7b9 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-26093
2007-03-01 20:08:58 -07:00
malff/marcsql@weblab.(none)
ad45f0168d Bug#26093 (SELECT BENCHMARK() for SELECT statements does not produce valid
results)

Before this fix, the function BENCHMARK() would fail to evaluate expressions
like "(select avg(a) from t1)" in debug builds (with an assert),
or would report a time of zero in non debug builds.

The root cause is that evaluation of DECIMAL_RESULT expressions was not
supported in Item_func_benchmark::val_int().

This has been fixed by this change.
2007-03-01 19:20:47 -07:00
evgen@moonbone.local
44f97f3f50 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/25122-bug-5.0-opt-mysql
2007-03-02 00:10:25 +03:00
evgen@moonbone.local
11588e5e4a Bug#25122: Views based on a self-joined table aren't insertable.
When INSERT is done over a view the table being inserted into is 
checked to be unique among all views tables. But if the view contains
self-joined table an error will be thrown even if all tables are used under
different aliases.

The unique_table() function now also checks tables' aliases when needed.
2007-03-02 00:09:22 +03:00
malff/marcsql@weblab.(none)
df5c5aea23 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
2007-03-01 14:06:57 -07:00
msvensson@pilot.blaudden
f5778fc73e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-01 18:12:56 +01:00
malff/marcsql@weblab.(none)
14e1ed367e Merge weblab.(none):/home/marcsql/TREE/mysql-4.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-4.1-runtime
2007-03-01 05:59:16 -07:00
lars/lthalmann@mysql.com/dl145j.mysql.com
2f5a2b2476 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-03-01 11:37:28 +01:00
jamppa@bk-internal.mysql.com
87e7afe541 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-marvel
2007-03-01 10:47:30 +01:00
rafal@quant.(none)
536d857d95 Removing two more compilation warnings. 2007-03-01 10:40:48 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
ff5376986f Disabled compiler warnings. 2007-03-01 10:52:25 +02:00
rafal@quant.(none)
dc6e9d7fc3 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-rpl-warnings
2007-03-01 08:47:49 +01:00
rafal@quant.(none)
8aee1f6e89 Fixes of compilation warnings and errors. 2007-03-01 08:41:13 +01:00
lars/lthalmann@mysql.com/dl145k.mysql.com
12e9464b5a Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-02-28 22:30:40 +01:00
jani@ua141d10.elisa.omakaista.fi
bcbc0031eb Fixed compiler warnings. 2007-02-28 22:23:35 +02:00
msvensson@pilot.blaudden
6fac51be9f Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint-bug20166
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-28 16:40:03 +01:00
msvensson@pilot.blaudden
b0ab925389 Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-28 16:39:26 +01:00
msvensson@pilot.blaudden
6ca22c6672 Bug#24878 mysql server doesn't log incident time in "mysqld got signal 11" error messages
- Add printout of current time when mysqld is killed by an
   unhandled signal
2007-02-28 16:37:50 +01:00
svoj@mysql.com/june.mysql.com
aae6e1aba4 BUG#26238 - inserted delayed always inserts 0 for BIT columns
INSERT DELAYED inserts garbage for BIT columns.

When delayed thread clones TABLE object, it didn't adjusted bit_ptr
to newly created record (though it correctly adjusts ptr and null_ptr).

This is fixed by correctly adjusting bit_ptr when performing a clone.
With this fix BIT values are stored correctly by INSERT DELAYED.
2007-02-28 18:34:35 +04:00
bar@mysql.com
3c3964359d Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b24478
2007-02-28 18:21:00 +04:00
bar@mysql.com
7e38927a38 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b15126
2007-02-28 17:17:06 +04:00
bar@mysql.com
dd0c43d5fa Bug#15126 character_set_database is not replicated (LOAD DATA INFILE need it)
This patch fixes problem that LOAD DATA could use different
character sets when loading files on master and on slave sides:
- Adding replication of thd->variables.collation_database
- Adding optional character set clause into LOAD DATA

Note, the second way, with explicit CHARACTER SET clause
should be the recommended way to load data using an alternative
character set.
The old way, using "SET @@character_set_database=xxx" should be
gradually depricated.
2007-02-28 17:06:57 +04:00
kostja@bodhi.local
7d98fb7e33 Add more comments to open_table and open_tables. No real changes. 2007-02-28 16:03:38 +03:00
msvensson@pilot.blaudden
44c56e35b6 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-28 11:21:29 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
08431e7865 Merge mysql.com:/home/ram/work/b26038/b26038.4.1
into  mysql.com:/home/ram/work/b26038/b26038.5.0
2007-02-28 12:13:46 +04:00
rafal@quant.(none)
5efe0e4a2f Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug25306
2007-02-28 08:50:25 +01:00
rafal@quant.(none)
235ca912d8 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug25306
2007-02-27 19:38:39 +01:00
lars/lthalmann@mysql.com/dl145j.mysql.com
6889569fcb Merge mysql.com:/nfsdisk1/lars/MERGE/mysql-4.1-merge
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-02-27 18:40:57 +01:00
cbell/Chuck@mysql_cab_desk.
d13c3b9456 BUG#20141 "User-defined variables are not replicated properly for
SF/Triggers in SBR mode."
BUG#14914 "SP: Uses of session variables in routines are not always replicated"
BUG#25167 "Dupl. usage of user-variables in trigger/function is not replicated
          correctly"

This patch corrects a minor error in the previous patch for BUG#20141. This patch
corrects an errant code change to sp_head.cc. The comments for the first patch follow:

User-defined variables used inside of stored functions/triggers in
statements which did not update tables directly were not replicated.
We also had problems with replication of user-defined variables which
were used in triggers (or stored functions called from table-updating
statements) more than once.

This patch addresses the first issue by enabling logging of all
references to user-defined variables in triggers/stored functions
and not only references from table-updating statements.

The second issue stemmed from the fact that for user-defined
variables used from triggers or stored functions called from
table-updating statements we were writing binlog events for each
reference instead of only one event for the first reference.
This problem is already solved for stored functions called from
non-updating statements with help of "event unioning" mechanism.
So the patch simply extends this mechanism to the case affected.
It also fixes small problem in this mechanism which caused wrong
logging of references to user-variables in cases when non-updating
statement called several stored functions which used the same
variable and some of these function calls were omitted from binlog
as they were not updating any tables.
2007-02-27 10:32:45 -05:00
msvensson@pilot.blaudden
14cfc7e1ba Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-27 14:54:33 +01:00
bar@mysql.com
75177d9cf8 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql.com:/home/bar/mysql-5.0.b24478
2007-02-27 12:46:50 +04:00
gluh@mysql.com/eagle.(none)
b3cb846680 removed unused variable 2007-02-27 12:37:17 +04:00
gbichot@dl145h.mysql.com
d204dc2d21 Fix for BUG#26050 "LOAD DATA INFILE breaks ACID"; the ok must be sent
to the client only after the binlog write and engine commit.
No testcase for this bug, as to reproduce it, we need to "kill -9" mysqld,
which we cannot do in the testsuite. But, I tested by hand.
2007-02-26 20:35:28 +01:00
cbell/Chuck@mysql_cab_desk.
e9481608c3 Merge cbell@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql_cab_desk.:C:/source/c++/mysql-5.0-rpl
2007-02-26 14:30:44 -05:00
gluh@mysql.com/eagle.(none)
e8635ad3cb Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-26 16:57:45 +04:00
bar@mysql.com
8f97dea5f8 Bug#24478 DROP TRIGGER is not caught by replicate-*-table filters
Problem: DROP TRIGGER was not properly handled in combination
with slave filters, which made replication stop
Fix: loading table name before checking slave filters when
dropping a trigger.
2007-02-26 15:25:43 +04:00
evgen@sunlight.local
d9831e91a1 item.cc, item.h:
Post fix for bug#23800.
2007-02-26 09:01:43 +03:00
evgen@sunlight.local
e91347dd49 item.h:
Post fix for bug#23800.
  Copy the table name of an Item_outer_ref to the conventional memory.
2007-02-25 23:02:11 +03:00
lars/lthalmann@mysql.com/dl145j.mysql.com
aafc285d75 log_on needed also in embedded server 2007-02-25 00:31:26 +01:00
lars/lthalmann@mysql.com/dl145j.mysql.com
1a09fb81fc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-02-25 00:10:51 +01:00
evgen@moonbone.local
47ffb61fb0 item.cc:
Post fix for bug#23800.
  The Item_field constructor now increases the select_n_where_fields counter.
sql_yacc.yy:
  Post fix for bug#23800.
  Take into account fields that might be added by subselects.
sql_lex.h:
  Post fix for bug#23800.
  Added the select_n_where_fields variable to the st_select_lex class.
sql_lex.cc:
  Post fix for bug#23800.
  Initialization of the select_n_where_fields variable.
2007-02-24 23:04:15 +03:00
lars/lthalmann@mysql.com/dl145h.mysql.com
1777f04e39 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-02-24 11:41:31 +01:00
cbell/Chuck@mysql_cab_desk.
9017512bd6 Merge mysql_cab_desk.:C:/source/c++/mysql-5.0-rpl
into  mysql_cab_desk.:C:/source/c++/mysql-5.0_BUG_20141
2007-02-23 13:00:08 -05:00
cbell/Chuck@mysql_cab_desk.
4c6ced9fc5 BUG#20141 "User-defined variables are not replicated properly for SF/
Triggers in SBR mode."
BUG#14914 "SP: Uses of session variables in routines are not always
           replicated"
BUG#25167 "Dupl. usage of user-variables in trigger/function is not
           replicated correctly"

User-defined variables used inside of stored functions/triggers in
statements which did not update tables directly were not replicated.
We also had problems with replication of user-defined variables which
were used in triggers (or stored functions called from table-updating
statements) more than once.

This patch addresses the first issue by enabling logging of all
references to user-defined variables in triggers/stored functions
and not only references from table-updating statements.

The second issue stemmed from the fact that for user-defined
variables used from triggers or stored functions called from
table-updating statements we were writing binlog events for each
reference instead of only one event for the first reference.
This problem is already solved for stored functions called from
non-updating statements with help of "event unioning" mechanism.
So the patch simply extends this mechanism to the case affected.
It also fixes small problem in this mechanism which caused wrong
logging of references to user-variables in cases when non-updating
statement called several stored functions which used the same
variable and some of these function calls were omitted from binlog
as they were not updating any tables.
2007-02-23 12:58:56 -05:00
msvensson@pilot.blaudden
e50b39a663 Merge pilot.blaudden:/home/msvensson/mysql/bug26536/my50-bug26536
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-23 17:59:33 +01:00
gkodinov/kgeorge@macbook.gmz
f88aec9e7a Bug #26186:
When handling DELETE ... FROM if there is no
condition it is internally transformed to 
TRUNCATE for more efficient execution by the
storage handler.
The check for validity of the optional ORDER BY 
clause is done after the check for the above 
optimization and will not be performed if the
optimization can be applied.
Moved the validity check for ORDER BY before 
the optimization so it performed regardless of
the optimization.
2007-02-23 18:49:41 +02:00
msvensson@pilot.blaudden
7e292b9a9a Bug#26536 func_time failure on vm-win2003-64-b, occurs every time
- Avoid overflow in sec_since_epoch by shifting the time
   back 2 days for times close to the maximum range of my_time_t
 - Improve comment about why we need my_time_t
 - Patch will also fix timezone2.test
2007-02-23 17:33:11 +01:00
gbichot@dl145h.mysql.com
44c6c4cc05 the fix for BUG#24432
"INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values"
didn't make it into 5.0.36 and 5.1.16,
so we need to adjust the bug-detection-based-on-version-number code.
Because the rpl tree has a too old version, rpl_insert_id cannot pass,
so I disable it (like is already the case in 5.1-rpl for the same reason),
and the repl team will re-enable it when they merge 5.0 and 5.1 into
their trees (thus getting the right version number).
2007-02-23 15:32:51 +01:00
msvensson@pilot.blaudden
ba3c96f507 Bug#25197 repeat function returns null when using table field directly as count
- Return empty string also if count is unsigned and value is 0
2007-02-23 10:28:50 +01:00
rafal@quant.(none)
d6e5e3d367 Merge quant.(none):/ext/mysql/bkroot/mysql-5.0-rpl
into  quant.(none):/ext/mysql/bk/mysql-5.0-bug25306
2007-02-23 01:28:24 +01:00
monty@mysql.com/narttu.mysql.fi
8f4fef291d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-22 20:32:19 +02:00
msvensson@pilot.blaudden
e063f18d97 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/comp_err_checksum/my50-comp_err_checksum
2007-02-22 19:16:18 +01:00
msvensson@pilot.blaudden
43fae314a1 Bug#24617 Typo in Czech translation 2007-02-22 17:53:41 +01:00
msvensson@pilot.blaudden
05305f462b Bug #26571 Different format specifiers in errmsg.txt
- Add check of format specifiers in error message strings
- Update error message text accordingly to be equal between all translations
2007-02-22 16:41:51 +01:00
monty@mysql.com/narttu.mysql.fi
e5cc397f33 Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases)
2007-02-22 16:59:57 +02:00
evgen@moonbone.local
76461a4442 Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/23800-bug1-5.0-opt-mysql
2007-02-21 23:18:17 +03:00
evgen@moonbone.local
9a233742b8 Bug#23800: Outer fields in correlated subqueries is used in a temporary table
created for sorting.

Any outer reference in a subquery was represented by an Item_field object.
If the outer select employs a temporary table all such fields should be
replaced with fields from that temporary table in order to point to the 
actual data. This replacement wasn't done and that resulted in a wrong
subquery evaluation and a wrong result of the whole query.

Now any outer field is represented by two objects - Item_field placed in the
outer select and Item_outer_ref in the subquery. Item_field object is
processed as a normal field and the reference to it is saved in the
ref_pointer_array. Thus the Item_outer_ref is always references the correct
field. The original field is substituted for a reference in the
Item_field::fix_outer_field() function.

New function called fix_inner_refs() is added to fix fields referenced from
inner selects and to fix references (Item_ref objects) to these fields.

The new Item_outer_ref class is a descendant of the Item_direct_ref class.
It additionally stores a reference to the original field and designed to
behave more like a field.
2007-02-21 23:00:32 +03:00
monty@mysql.com/narttu.mysql.fi
6946fa682f After merge fixes
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
2007-02-21 19:38:40 +02:00
tomas@poseidon.mysql.com
9cae1fd7ee Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  poseidon.mysql.com:/home/tomas/mysql-5.0
2007-02-21 21:50:43 +07:00
monty@mysql.com/narttu.mysql.fi
26aa385bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-21 14:07:08 +02:00
monty@mysql.com/narttu.mysql.fi
222e128b34 Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
2007-02-21 13:02:57 +02:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
049251624a Fix for bug #26038: X() value of empty NOT NULL POINT is neither NULL nor NOT NULL
Having maybe_null flag unset for geometry/spatial functions leads to
wrong Item_func_isnull::val_int()'s results.
Fix: set maybe_null flag and add is_null() methods.
2007-02-21 14:45:19 +04:00
kaa@polly.local
b7e6df7cc9 Merge polly.local:/tmp/maint/bug25137/my50-bug25137
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-02-20 22:23:51 +03:00
msvensson@pilot.blaudden
6caa0a232e Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Part 2, add @@hostname system variable
2007-02-20 16:24:38 +01:00
msvensson@pilot.blaudden
bcd368fcfb Bug#20166 mysql-test-run.pl does not test system privilege tables creation
- Add test of bootstrap mode
 - Make mysqld return error if bootstrap failed
2007-02-20 12:48:15 +01:00
gkodinov/kgeorge@rakia.gmz
96a868a737 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
2007-02-19 17:35:19 +02:00
thek@kpdesk.mysql.com
8f24815af1 Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my41-bug23240
into  kpdesk.mysql.com:/home/thek/dev/mysql-4.1-runtime
2007-02-19 15:26:07 +01:00
thek@kpdesk.mysql.com
3c88372a1e Merge kpdesk.mysql.com:/home/thek/dev/bug23240/my50-bug23240
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-runtime
2007-02-19 15:24:01 +01:00
thek@kpdesk.mysql.com
19dfc42eb6 Bug#23240 --init_file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by bootstrapping wasn't initialized
  and starting time defaulted to 0. This later used value by NOW-
  item and was translated to 1970-01-01 11:00:00.
- Marketing the time with thd->set_time() before the call to
  mysql_parse resolves this issue.
- set_time was refactored to be part of the thd->init_for_queries-
  process.
2007-02-19 14:57:54 +01:00
gkodinov/kgeorge@rakia.gmz
90a6925546 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B19717-5.0-opt
2007-02-19 15:45:01 +02:00
gkodinov/kgeorge@rakia.gmz
8f52c5b207 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B25831-5.0-opt
2007-02-19 14:47:16 +02:00
gkodinov/kgeorge@macbook.gmz
d17ad7b3a4 Bug #25831: Deficiencies in INSERT ... SELECT ... field name resolving.
Several problems fixed: 
  1. There was a "catch-all" context initialization in setup_tables()
    that was causing the table that we insert into to be visible in the 
    SELECT part of an INSERT .. SELECT .. statement with no tables in
    its FROM clause. This was making sure all the under-initialized
    contexts in various parts of the code are not left uninitialized.
    Fixed by removing the "catch-all" statement and initializing the 
    context in the parser.
  2. Incomplete name resolution context when resolving the right-hand
    values in the ON DUPLICATE KEY UPDATE ... part of an INSERT ... SELECT ...
    caused columns from NATURAL JOIN/JOIN USING table references in the
    FROM clause of the select to be unavailable.
    Fixed by establishing a proper name resolution context.
  3. When setting up the special name resolution context for problem 2
    there was no check for cases where an aggregate function without a
    GROUP BY effectively takes the column from the SELECT part of an 
    INSERT ... SELECT unavailable for ON DUPLICATE KEY UPDATE.
    Fixed by checking for that condition when setting up the name 
    resolution context.
2007-02-19 14:39:37 +02:00
msvensson@pilot.blaudden
e3448ec05a Merge pilot.blaudden:/home/msvensson/mysql/comp_err_checksum/my50-comp_err_checksum
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-19 12:50:36 +01:00
kaa@polly.local
315819fed0 Bug#18743: Several test cases fails if "classic" configuration in 5.0
The problem happened because those tests were using "cp932" and "ucs2" without checking whether these character sets are available. This fix moves test parts to make character set specific parts be tested only if they are:
- some parts were moved to "ctype_ucs.test" and "ctype_cp932.test"
- some parts were moved to the newly added tests "innodb-ucs2.test", "mysqlbinglog-cp932.test" and "sp-ucs2.test"
2007-02-19 13:57:06 +03:00
thek@kpdesk.mysql.com
dd41fd5732 Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
- Starting time of a query sent by file bootstrapping wasn't initialized
  and starting time defaulted to 0. This later used value by the Now-
  item and is translated to 1970-01-01 11:00:00.
- marking the time with thd->set_time() before the call to 
  mysql_parse resolves this issue.
2007-02-19 09:37:34 +01:00
igor@olga.mysql.com
f5888a8d10 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-02-16 09:39:08 -08:00
evgen@moonbone.local
31d63b7971 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/16630-bug-5.0-opt-mysql
2007-02-16 19:44:54 +03:00
evgen@moonbone.local
7916d9e965 Bug#16630: The update fields of the INSERT .. SELECT .. ON DUPLICATE KEY
UPDATE contains wrong data if the SELECT employs a temporary table.

If the UPDATE values of the INSERT .. SELECT .. ON DUPLICATE KEY UPDATE
statement contains fields from the SELECT part and the select employs a
temporary table then those fields will contain wrong values because they
aren't corrected to get data from the temporary table.

The solution is to add these fields to the selects all_fields list,
to store pointers to those fields in the selects ref_pointer_array and
to access them via Item_ref objects.

The substitution for Item_ref objects is done in the new function called 
Item_field::update_value_transformer(). It is called through the
item->transform() mechanism at the end of the select_insert::prepare()
function.
2007-02-16 19:39:28 +03:00
malff/marcsql@weblab.(none)
f8839a70bd Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
2007-02-16 09:02:02 -07:00
tomas@poseidon.mysql.com
9defcbbff4 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
2007-02-16 20:07:05 +07:00
istruewing@chilla.local
97c6a6c4e8 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-16 10:39:45 +01:00
msvensson@pilot.blaudden
486dfab32b Merge 192.168.0.10:mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-15 15:56:38 +01:00
guilhem@gbichot3.local
2f75c9cd69 Backport from the Falcon tree.
When opening/creating the transaction coordinator's log, if binlog is
used, the tc log is the binlog so we use the binlog's name; otherwise
we use the mmap-based log, named after the mandatory argument of the
--log-tc option (meant for that).
2007-02-15 15:50:56 +01:00
guilhem@gbichot3.local
8b1609a637 Fix for BUG#25507 "multi-row insert delayed + auto increment causes
duplicate key entries on slave" (two concurrrent connections doing
multi-row INSERT DELAYED to insert into an auto_increment column,
caused replication slave to stop with "duplicate key error" (and
binlog was wrong)), and BUG#26116 "If multi-row INSERT
DELAYED has errors, statement-based binlogging breaks" (the binlog
was not accounting for all rows inserted, or slave could stop).
The fix is that: if (statement-based) binlogging is on, a multi-row
INSERT DELAYED is silently converted to a non-delayed INSERT.
Note: it is not possible to test BUG#25507 in 5.0 (requires mysqlslap),
so it is tested only in the changeset for 5.1. However, BUG#26116
is tested here, and the fix for BUG#25507 is the same code change.
2007-02-15 15:39:03 +01:00
msvensson@neptunus.(none)
c94085cc5d Merge neptunus.(none):/home/msvensson/mysql/bug10777/my50-bug10777
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2007-02-15 15:05:25 +01:00
msvensson@neptunus.(none)
68158c982d Merge neptunus.(none):/home/msvensson/mysql/bug10777/my41-bug10777
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
2007-02-15 15:04:53 +01:00
msvensson@neptunus.(none)
cf5d849bcf Merge neptunus.(none):/home/msvensson/mysql/bug10777/my41-bug10777
into  neptunus.(none):/home/msvensson/mysql/bug10777/my50-bug10777
2007-02-15 14:58:24 +01:00
msvensson@pilot.mysql.com
7771db0183 Remove the newly added space in error message, should not be there 2007-02-15 11:17:25 +01:00
igor@olga.mysql.com
a2d4a042d0 Fixed bug #25971: indexes on text columns were ignored when ref accesses
were evaluated.
According to the new rules for string comparison partial indexes on text
columns can be used in the same cases when partial indexes on varchar
columns can be used.
2007-02-14 22:06:41 -08:00
msvensson@pilot.mysql.com
67cc343c34 Add check of format specifiers in error message strings
Update error message text accordingly to be equal between all translations
2007-02-14 19:31:06 +01:00
cmiller@calliope.local.cmiller/calliope.local
80a35bfd39 Merge calliope.local.cmiller:/Volumes/Source/src/mysql-4.1-maint--bug25126
into  calliope.local.cmiller:/Volumes/Source/src/mysql-4.1-maint
2007-02-14 12:24:11 -05:00
gkodinov/kgeorge@macbook.gmz
664f24d5c3 Bug#19717: The blackhole engine is returning an OK flag in
index_read(), whereas it must return HA_ERR_END_OF_FILE
instead (as there are by definition no rows in a table of 
that engine.
2007-02-14 18:35:59 +02:00
cmiller@calliope.local.cmiller/calliope.local
cbdaf5b641 Merge calliope.local.cmiller:/Volumes/Source/src/mysql-4.1-maint--bug25126
into  calliope.local.cmiller:/Volumes/Source/src/mysql-5.0-maint
2007-02-14 11:27:37 -05:00
cmiller@zippy.cornsilk.net
154f7f396e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-02-14 10:47:39 -05:00
msvensson@pilot.mysql.com
24a242bee1 Merge pilot.mysql.com:/home/msvensson/mysql/bug18628/my50-bug18628
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-14 14:45:15 +01:00
msvensson@pilot.mysql.com
45fe5879f4 Bug#18628 mysql-test-run: security problem(part1)
- Implement --secure-file-priv=<dir> option that limits
  "load_file", "LOAD DATA" and "SELECT .. INTO OUTFILE" to work 
  with files in specified dir.
 - Use above option for mysqld in mysql-test-run.pl
2007-02-14 14:44:34 +01:00
istruewing@chilla.local
aba12aca0f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-14 12:02:58 +01:00
tomas@poseidon.mysql.com
b7c3aeae2c Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
2007-02-14 15:18:15 +07:00
tomas@poseidon.mysql.com
120eaec17c Bug #21033 Error 0 in readAutoIncrementValue()
- do not call function if table has no autoincrement
2007-02-14 15:16:26 +07:00
ibabaev@bk-internal.mysql.com
266300142e Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-02-13 23:35:06 +01:00
cmiller@zippy.cornsilk.net
11e8f48734 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2007-02-13 10:54:04 -05:00
cmiller@zippy.cornsilk.net
6473de8db1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-02-13 10:02:00 -05:00
msvensson@pilot.mysql.com
818cb094fc Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-13 09:56:56 +01:00
igor@olga.mysql.com
0461228a70 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26209
2007-02-12 23:10:33 -08:00
holyfoot/hf@mysql.com/hfmain.(none)
30614d22c1 Merge mysql.com:/home/hf/work/20691/my50-20691
into  mysql.com:/home/hf/work/25492/my50-25492
2007-02-13 01:23:23 +04:00
malff/marcsql@weblab.(none)
4e556b2305 Bug#24532 (The return data type of IS TRUE is different from similar
operations)

Before this change, the boolean predicates:
- X IS TRUE,
- X IS NOT TRUE,
- X IS FALSE,
- X IS NOT FALSE
were implemented by expanding the Item tree in the parser, by using a
construct like:
Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>)

Each <value> was a constant integer, either 0 or 1.

A bug in the implementation of the function IF(a, b, c), in
Item_func_if::fix_length_and_dec(), would cause the following :

When the arguments b and c are both unsigned, the result type of the
function was signed, instead of unsigned.

When the result of the if function is signed, space for the sign could be
counted twice (in the max() expression for a signed argument, and in the
total), causing the member max_length to be too high.

An effect of this is that the final type of IF(x, int(1), int(1)) would be
int(2) instead of int(1).

With this fix, the problems found in Item_func_if::fix_length_and_dec()
have been fixed.

While it's semantically correct to represent 'X IS TRUE' with
Item_func_if(Item_func_ifnull(X, <value>), <value>, <value>),
there are however more problems with this construct.

a)
Building the parse tree involves :
- creating 5 Item instances (3 ints, 1 ifnull, 1 if),
- creating each Item calls my_pthread_getspecific_ptr() once in the operator
  new(size), and a second time in the Item::Item() constructor, resulting
  in a total of 10 calls to get the current thread.
Evaluating the expression involves evaluating up to 4 nodes at runtime.
This representation could be greatly simplified and improved.

b)
Transforming the parse tree internally with if(ifnull(...)) is fine as long
as this transformation is internal to the server implementation.
With views however, the result of the parse tree is later exposed by the
::print() functions, and stored as part of the view definition.
Doing this has long term consequences:

1)
The original semantic 'X IS TRUE' is lost, and replaced by the
if(ifnull(...)) expression. As a result, SHOW CREATE VIEW does not restore
the original code.

2)
Should a future version of MySQL implement the SQL BOOLEAN data type for
example, views created today using 'X IS NULL' can be exported using
mysqldump, and imported again. Such views would be converted correctly and
automatically to use a BOOLEAN column in the future version.
With 'X IS TRUE' and the current implementations, views using these
"boolean" predicates would not be converted during the export/import, and
would use integer columns instead.
The difference traces back to how SHOW CREATE VIEW preserves 'X IS NULL' but
does not preserve the 'X IS TRUE' semantic.

With this fix, internal representation of 'X IS TRUE' booleans predicates
has changed, so that:
- dedicated Item classes are created for each predicate,
- only 1 Item is created to represent 1 predicate
- my_pthread_getspecific_ptr() is invoked 1 time instead of 10
- SHOW CREATE VIEW preserves the original semantic, and prints 'X IS TRUE'.

Note that, because of the fix in Item_func_if, views created before this fix
will:
- correctly use a int(1) type instead of int(2) for boolean predicates,
- incorrectly print the if(ifnull(...), ...) expression in SHOW CREATE VIEW,
since the original semantic (X IS TRUE) has been lost.
- except for the syntax used in SHOW CREATE VIEW, these views will operate
properly, no action is needed.

Views created after this fix will operate correctly, and will preserve the
original code semantic in SHOW CREATE VIEW.
2007-02-12 13:59:29 -07:00
gluh@mysql.com/eagle.(none)
6caff6f708 valgrind error fix 2007-02-12 19:28:49 +04:00
tnurnberg@mysql.com/sin.azundris.com
293352cbe4 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/24660/50-24660
2007-02-12 14:49:34 +01:00
tnurnberg@mysql.com/sin.azundris.com
8dc8e07fcf Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/tnurnberg/24660/41-24660
2007-02-12 14:39:45 +01:00
tnurnberg@mysql.com/sin.azundris.com
ed82b013b8 Merge mysql.com:/home/tnurnberg/24660/41-24660
into  mysql.com:/home/tnurnberg/24660/50-24660
2007-02-12 14:32:06 +01:00
tnurnberg@mysql.com/sin.azundris.com
db7ac2c0c7 Bug#24660: "enum" field type definition problem
ENUMs weren't allowed to have character 0xff, a perfectly good character in some locales.
This was circumvented by mapping 0xff in ENUMs to ',', thereby prevent actual commas from
being used. Now if 0xff makes an appearance, we find a character not used in the enum and
use that as a separator. If no such character exists, we throw an error.

Any solution would have broken some sort of existing behaviour. This solution should
serve both fractions (those with 0xff and those with ',' in their enums), but
WILL REQUIRE A DUMP/RESTORE CYCLE FROM THOSE WITH 0xff IN THEIR ENUMS. :-/
That is, mysqldump with their current server, and restore when upgrading to one with
this patch.
2007-02-12 14:31:44 +01:00
gluh@mysql.com/eagle.(none)
47e537b47c Bug#24630 Subselect query crashes mysqld
The crash happens because second filling of the same I_S table happens in
case of subselect with order by. table->sort.io_cache previously allocated
in create_sort_index() is deleted during second filling
(function get_schema_tables_result). There are two places where
I_S table can be filled: JOIN::exec and create_sort_index().
To fix the bug we should check if the table was already filled
in one of these places and skip processing of the table in second.
2007-02-12 16:06:14 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
8299b596ae bug #20691 (INSERT (DEFAULT) may insert garbage with NO DEFAULT NOT NULL field)
Some fields (GEOMETRY first of all) can't be handled properly in this
case at all. So we return an error in this case
2007-02-12 15:41:36 +04:00
igor@olga.mysql.com
0583c7c524 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26159
2007-02-11 22:48:40 -08:00
igor@olga.mysql.com
4b1a1d9eb7 Fixed bug #26209.
The function make_unireg_sortorder ignored the fact that any
view field is represented by a 'ref' object.
This could lead to wrong results for the queries containing
both GROUP BY and ORDER BY clauses.
2007-02-11 19:36:46 -08:00
evgen@moonbone.local
ffdf7b159b sql_view.cc:
Post fix for bug#12122.
information_schema.result:
  Corrected test case after fixing bug#12122.
2007-02-11 22:52:12 +03:00
evgen@moonbone.local
9e2a0c7528 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/12122-bug-5.0-opt-mysql
2007-02-11 21:03:40 +03:00
igor@olga.mysql.com
976e747aaf Fixed bug #26159.
A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
caused a crash when a query with DISTINCT was executed by a loose scan
for an InnoDB table that had been emptied.
2007-02-10 23:55:56 -08:00
evgen@moonbone.local
a241446362 Bug#12122: The MERGE algorithm isn't applicable if the ORDER BY clause is
present.

A view created with CREATE VIEW ... ORDER BY ... cannot be resolved with
the MERGE algorithm, even when no other part of the CREATE VIEW statement
would require the view to be resolved using the TEMPTABLE algorithm.

The check for presence of the ORDER BY clause in the underlying select is 
removed from the st_lex::can_be_merged() function.
The ORDER BY list of the underlying select is appended to the ORDER BY list
2007-02-10 00:00:07 +03:00
igor@olga.mysql.com
3fe9de2879 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug26017
2007-02-09 12:58:35 -08:00
igor@olga.mysql.com
951fe3cade Fixed bug #26017.
Objects of the class Item_equal contain an auxiliary member
eval_item of the type cmp_item that is used only for direct 
evaluation of multiple equalities. Currently a multiple equality
is evaluated directly only in the cases when the equality holds
at most for one row in the result set.
The compare collation of eval_item was determined incorectly.
It could lead to returning incorrect results for some queries.
2007-02-09 12:54:50 -08:00
evgen@moonbone.local
380c220545 Bug#23170: LAST_INSERT_ID isn't reset to 0 in INSERT .. SELECT when no rows were
inserted.

The select_insert::send_eof() function now resets LAST_INSERT_ID variable if
no rows were inserted.
2007-02-09 22:25:09 +03:00
cmiller@calliope.local.cmiller/calliope.local
0733ea7462 Bug#25126: Reference to non-existant column in UPDATE...ORDER BY... crashes server
"update existingtable set anycolumn=nonexisting order by nonexisting" would crash
the server.

Though we would find the reference to a field, that doesn't mean we can then use
it to set some values.  It could be a reference to another field.  If it is NULL, 
don't try to use it to set values in the Item_field and instead return an error.

Over the previous patch, this signals an error at the location of the error, rather
than letting the subsequent deref signal it.
2007-02-09 11:05:36 +01:00
gkodinov/kgeorge@macbook.gmz
a119169bf0 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B22344-5.0-opt
2007-02-09 11:07:35 +02:00
gkodinov/kgeorge@macbook.gmz
053f7a42e6 Addendum to fix of bug #22344 : removed dead code. 2007-02-09 11:05:23 +02:00
tsmith@siva.hindu.god
4211f6d7d7 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-02-08 16:01:45 -07:00
tsmith@siva.hindu.god
4579445b2a Merge siva.hindu.god:/home/tsmith/m/bk/41
into  siva.hindu.god:/home/tsmith/m/bk/maint/41
2007-02-08 16:01:13 -07:00
malff/marcsql@weblab.(none)
dc8e36ebcf Merge weblab.(none):/home/marcsql/TREE/mysql-4.1
into  weblab.(none):/home/marcsql/TREE/mysql-4.1-rtmerge
2007-02-08 08:51:13 -07:00
guilhem@gbichot3.local
1e74079be4 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  gbichot3.local:/home/mysql_src/mysql-5.0-rpl-24432
2007-02-08 15:57:27 +01:00
guilhem@gbichot3.local
b3a03dada9 Fix for BUG#24432
"INSERT... ON DUPLICATE KEY UPDATE skips auto_increment values".
When in an INSERT ON DUPLICATE KEY UPDATE, using
an autoincrement column, we inserted some autogenerated values and
also updated some rows, some autogenerated values were not used
(for example, even if 10 was the largest autoinc value in the table
at the start of the statement, 12 could be the first autogenerated
value inserted by the statement, instead of 11). One autogenerated
value was lost per updated row. Led to exhausting the range of the
autoincrement column faster.
Bug introduced by fix of BUG#20188; present since 5.0.24 and 5.1.12.
This bug breaks replication from a pre-5.0.24 master.
But the present bugfix, as it makes INSERT ON DUP KEY UPDATE
behave like pre-5.0.24, breaks replication from a [5.0.24,5.0.34]
master to a fixed (5.0.36) slave! To warn users against this when
they upgrade their slave, as agreed with the support team, we add
code for a fixed slave to detect that it is connected to a buggy
master in a situation (INSERT ON DUP KEY UPDATE into autoinc column)
likely to break replication, in which case it cannot replicate so
stops and prints a message to the slave's error log and to SHOW SLAVE
STATUS.
For 5.0.36->[5.0.24,5.0.34] replication we cannot warn as master
does not know the slave's version (but we always recommended to users
to have slave at least as new as master).
As agreed with support, I'll also ask for an alert to be put into
the MySQL Network Monitoring and Advisory Service.
2007-02-08 15:53:14 +01:00
gluh@mysql.com/eagle.(none)
e88351294b Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-08 15:34:22 +04:00
gluh@mysql.com/eagle.(none)
da9f2149de Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2007-02-08 14:54:49 +04:00
igor@olga.mysql.com
8d4027fd74 Fixed bug #25931.
View check option clauses were ignored for updates of multi-table
views when the updates could not be performed on fly and the rows
to update had to be put into temporary tables first.
2007-02-07 14:41:57 -08:00
antony@ppcg5.local
a3c3cda915 Bug#12204
"CONNECTION is a reserved keyword"
  Allow connection to be used as an ordinary identifier
  Tests included.
2007-02-07 14:22:19 -08:00
tomas@poseidon.mysql.com
d56756de0a Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
2007-02-08 00:00:14 +07:00
msvensson@pilot.mysql.com
eee38feda8 Avoid problem with "noinst_HEADERS" being sucked into "mysqld_LDADD" if openssl_libs and yassl_libs are empty strings 2007-02-07 15:11:03 +01:00
mskold/marty@mysql.com/linux.site
5df38bfc3e Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-02-07 12:29:34 +01:00
mskold/marty@mysql.com/linux.site
2d0bd82a06 NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc:
bug#25821  Excessive partition pruning for multi-range index scan in NDB API: added multi_range error checking in end_of_bound
ha_ndbcluster.h:
  Removed stray mthod declaration
2007-02-07 11:36:34 +01:00
msvensson@neptunus.(none)
72408c88bd Bug#10777 ERROR File = sql_lex.cc, Line = 93 The identifier "symbols" is undefined.
- Protect againt empty/corrupt lex_hash-h by writing output from gen_lex_hash to 
   a temporary file first.
2007-02-07 09:46:20 +01:00
igor@olga.mysql.com
5ed805bfd6 Fixed bug #26124: SELECT from a view wrapper over a table
with a column of the DATETIME type could return a wrong 
result set if the WHERE clause included a BETWEEN condition
on the column.
Fixed the method Item_func_between::fix_length_and_dec
where the aggregation type for BETWEEN predicates calculated
incorrectly if the first argument was a view column of the
DATETIME type.
2007-02-07 00:18:36 -08:00
malff/marcsql@weblab.(none)
b5f8b6363d Bug#12976 (stored procedures local variables of type bit)
Before this change, a local variables in stored procedures / stored functions
or triggers, when declared with a type of bit(N), would not evaluate their
value properly.

The problem was that the data was incorrectly typed as a string,
causing for example bit b'1', implemented as a byte 0x01, to be interpreted
as a string starting with the character 0x01. This later would cause
implicit conversions to integers or booleans to fail.

The root cause of this problem was an incorrect translation between field
types, like bit(N), and internal types used when representing values in Item
objects.

Also, before this change, the function HEX() would sometime print extra "0"
characters when invoked with bit(N) values.

With this fix, the type translation (sp_map_result_type, sp_map_item_type)
has been changed so that bit(N) fields are represented with integer values.

A consequence is that, for the function HEX(), when called with a stored
procedure local variable of type bit(N) as argument, HEX() is provided with an
integer instead of a string, and therefore does not print "0" padding.

A test case for Bug 12976 was present in the test suite, and has been updated.
2007-02-06 16:01:22 -07:00
mskold/marty@mysql.com/linux.site
0446aa9cbd Fix for bug#25821 Excessive partition pruning for multi-range index scan in NDB API: don't set distribution key if multi_range 2007-02-06 23:06:58 +01:00
evgen@moonbone.local
968369906e Bug#19978: INSERT .. ON DUPLICATE erroneously reports some records were
updated.

INSERT ... ON DUPLICATE KEY UPDATE reports that a record was updated when
the duplicate key occurs even if the record wasn't actually changed
because the update values are the same as those in the record.

Now the compare_record() function is used to check whether the record was
changed and the update of a record reported only if the record differs
from the original one.
2007-02-07 00:46:03 +03:00
msvensson@pilot.mysql.com
5959ca40d7 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-06 20:23:58 +01:00
msvensson@pilot.mysql.com
69510b7089 Merge pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-06 15:50:53 +01:00
msvensson@pilot.mysql.com
d018030b20 Merge 192.168.0.10:mysql/mysql-5.0-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-06 14:48:22 +01:00
msvensson@neptunus.(none)
ede3afe470 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2007-02-06 14:45:08 +01:00
msvensson@pilot.mysql.com
256cb08ba9 Merge 192.168.0.10:mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
2007-02-06 14:44:05 +01:00
msvensson@neptunus.(none)
6502f4300b Merge neptunus.(none):/home/msvensson/mysql/my41-nmj
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
2007-02-06 14:42:40 +01:00
msvensson@pilot.mysql.com
36207f8088 Merge bk-internal:/home/bk/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
2007-02-06 14:27:43 +01:00
msvensson@pilot.mysql.com
3f06339d7c Merge 192.168.0.10:mysql/mysql-4.1-maint
into  pilot.mysql.com:/home/msvensson/mysql/mysql-4.1-maint
2007-02-06 14:27:00 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
878759b218 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b23782/b23782.5.0
2007-02-06 17:18:43 +04:00
msvensson@neptunus.(none)
8c37b28c0b Bug#8983 one place that isn't strict-aliasing-safe
- Backport fix from 5.0
2007-02-06 14:07:40 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
85f2f924fd Fix for bug #23782: Stored procedures: crash if variable in procedure
analyse

We have to call fix_fields() for procedure analyse' arguments as they may   
not be
fixed in some circumstances.

(as the crash appears when mysqld starts skipping binlog, a test case
will be added when we can --skip-bin-log in -master.opt)
2007-02-06 15:58:40 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
d69e5063b2 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug23938/my41-bug23938
2007-02-06 14:58:07 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
a4bbd5bf76 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug23938/my50-bug23938
2007-02-06 14:28:46 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
f103fde258 Merge mysql.com:/usr/home/ram/work/bug23938/my41-bug23938
into  mysql.com:/usr/home/ram/work/bug23938/my50-bug23938
2007-02-06 13:57:20 +04:00
gkodinov/kgeorge@macbook.gmz
5092f7ab26 Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison
Ignoring error codes from type conversion allows default (wrong) values to
 go unnoticed in the formation of index search conditions.
 Fixed by correctly checking for conversion errors.
2007-02-06 11:08:57 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
1dd93dda08 Test and bug fixes and removed unneccessary files. 2007-02-05 17:09:44 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
64a728ce0c Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug10798/my41-bug10798
2007-02-05 10:20:47 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
47ae650a57 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug10798/my50-bug10798
2007-02-05 10:09:31 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
b0977714a8 Merge mysql.com:/usr/home/ram/work/bug10798/my41-bug10798
into  mysql.com:/usr/home/ram/work/bug10798/my50-bug10798
2007-02-05 09:54:23 +04:00
kroki/tomash@moonlight.home
664cd8b6a9 BUG#25897: Some queries are no longer possible after a CREATE VIEW
fails

The bug was introduced with the push of the fix for bug#20953: after
the error on view creation we never reset the error state, so some
valid statements would give the same error after that.

The solution is to properly reset the error state.
2007-02-04 16:49:24 +03:00
rafal@quant.(none)
b50f3c3149 BUG#25306 (Race conditions during replication slave shutdown (valgrind stacks)):
The possibility of the race is removed by changing sequence of calls

  pthread_mutex_unlock(&mi->run_lock);
  pthread_cond_broadcast(&mi->stop_cond);  

into

  pthread_cond_broadcast(&mi->stop_cond);
  pthread_mutex_unlock(&mi->run_lock);

at the end of I/O thread (similar change at the end of SQL thread). This ensures 
that no thread waiting on the condition executes between the broadcast and the 
unlock and thus can't delete the mi structure which caused the bug.
2007-02-03 20:14:16 +01:00
igor@olga.mysql.com
5313db2d82 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24035
2007-02-03 10:37:45 -08:00
istruewing@chilla.local
b444566412 After merge fix 2007-02-03 09:26:11 +01:00
igor@olga.mysql.com
215b0a95e1 Fix bug #24035.
This performance degradation for UPDATEs could be observed in the update
statements for which the search key cannot be converted to any valid
value of the type of the search column, like for a  the condition
int_fld=99999999999999999999999999, though it can be guaranteed here
that there is no row with such a key value.
2007-02-02 15:22:10 -08:00
istruewing@chilla.local
77e99fe2ce Merge chilla.local:/home/mydev/mysql-4.1-axmrg
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-02 23:05:46 +01:00
istruewing@chilla.local
41b6b32ef7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-02 21:32:58 +01:00
istruewing@chilla.local
972df14cc6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-02-02 20:23:03 +01:00
istruewing@chilla.local
177a366e53 After merge fix 2007-02-02 20:19:13 +01:00
cmiller@zippy.cornsilk.net
06916f5077 Reverting previous change from 1L -> 1ULL and LL(1) -> 1ULL and
making all to be uniform ULL(1), which is a local definition.
2007-02-02 13:11:44 -05:00
gluh@mysql.com/eagle.(none)
938de5eee4 another valgrind error fix for 4.1(backport from 5.0) 2007-02-02 17:18:42 +04:00
gluh@mysql.com/eagle.(none)
9663691aca Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-02-02 15:21:14 +04:00
malff/marcsql@weblab.(none)
093eba867d Improved comments 2007-02-01 09:36:17 -07:00
istruewing@chilla.local
dae855c168 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-01 17:10:09 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
2c45e72e04 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/home/ram/work/b26012/b26012.4.1
2007-02-01 19:56:14 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
ac0cab1589 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b26012/b26012.5.0
2007-02-01 19:55:11 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
7bcf2bf338 Merge mysql.com:/home/ram/work/b26012/b26012.4.1
into  mysql.com:/home/ram/work/b26012/b26012.5.0
2007-02-01 19:51:45 +04:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
d710853fb8 Fix for bug #26012: missed Field_double::size_of()
As we have Field_double::not_fixed we must have Field_double::size_of().
2007-02-01 19:51:02 +04:00
gluh@mysql.com/eagle.(none)
d1185aaeaf Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail
additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
2007-02-01 19:12:45 +04:00
istruewing@chilla.local
33e1d1091a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-02-01 15:51:25 +01:00
gluh@mysql.com/eagle.(none)
010dc0b55c Valgrind error fixes
Notes:
This patch doesn't fix all issues in the tree and we need jani's fix for that
This patch shoud not be merged into 5.0
2007-02-01 18:00:24 +04:00
mskold/marty@mysql.com/linux.site
0e20ef0ae4 Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into  mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
2007-02-01 13:59:34 +01:00
gkodinov/kgeorge@rakia.gmz
d9ae9ce58d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B23556-5.0-opt
2007-02-01 13:26:25 +02:00
istruewing@chilla.local
1c34270464 Merge chilla.local:/home/mydev/mysql-4.1-axmrg
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-01 10:19:22 +01:00
gkodinov/kgeorge@rakia.gmz
f697acb0ca Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B23556-5.0-opt
2007-02-01 11:07:17 +02:00
gkodinov/kgeorge@rakia.gmz
0d40608fff Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.gmz:/home/kgeorge/mysql/autopush/B25551-5.0-opt
2007-02-01 10:50:41 +02:00
mskold/marty@mysql.com/linux.site
c16251ad7c Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: moved back assignment 2007-02-01 09:48:45 +01:00
istruewing@chilla.local
a3705af35f Merge bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  chilla.local:/home/mydev/mysql-5.0-axmrg
2007-02-01 09:26:09 +01:00
istruewing@chilla.local
73e61944f7 Merge chilla.local:/home/mydev/mysql-4.0-axmrg
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-02-01 08:09:36 +01:00
istruewing@chilla.local
97cf413d55 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-axmrg
2007-02-01 07:52:28 +01:00
igor@olga.mysql.com
710136217b Fixed bug #25407.
The bug could cause choosing a sub-optimal execution plan for 
a single-table query if a unique index with many null keys were 
defined for the table. 
It happened because the code of the check_quick_keys function 
made an assumption that any key may occur in an unique index 
only once. Yet this is not true for keys with nulls that may 
have multiple occurrences in the index.
2007-01-31 19:31:36 -08:00
mskold/marty@mysql.com/linux.site
5cd40ad30b Bug #25522 Update with IN syntax Clustertable + Trigger leads to mysqld segfault: in start_stmt, only change query_state if starting a new transactions, in read_multi_range_next, change query state when end is reached 2007-01-31 22:38:06 +01:00
cmiller@zippy.cornsilk.net
a795b7097f Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2007-01-31 16:26:12 -05:00
cmiller@zippy.cornsilk.net
85896c0af5 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2007-01-31 16:23:10 -05:00
cmiller@zippy.cornsilk.net
ad66e7a0dd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2007-01-31 16:23:05 -05:00
igor@olga.mysql.com
8760182170 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2007-01-31 08:43:42 -08:00