Commit graph

49066 commits

Author SHA1 Message Date
gshchepa/uchum@gleb.loc
39c77427a6 sql_yacc.yy, sp.result, disabled.def:
Post-merge fix.
2007-07-31 13:22:01 +05:00
gshchepa/uchum@gleb.loc
c14d3d2f0d Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30120
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-31 12:09:59 +05:00
holyfoot/hf@hfmain.(none)
de8f84adfd Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/29717/my50-29717
2007-07-31 11:53:56 +05:00
gshchepa/uchum@gleb.loc
120866c273 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30120
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-31 11:16:11 +05:00
gshchepa/uchum@gleb.loc
2bba46d3fd Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-31 11:14:53 +05:00
holyfoot/hf@hfmain.(none)
d72a6b1227 Merge mysql.com:/home/hf/work/29717/my50-29717
into  mysql.com:/home/hf/work/29717/my51-29717
2007-07-31 11:12:23 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
0c63efcaf5 merging 2007-07-31 11:10:03 +05:00
holyfoot/hf@hfmain.(none)
0ff0ed2732 Merge mysql.com:/home/hf/work/29717/my41-29717
into  mysql.com:/home/hf/work/29717/my50-29717
2007-07-31 11:03:31 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
288ab1aa41 Merge mysql.com:/home/hf/work/029717/my41-29717
into  mysql.com:/home/hf/work/29717/my41-29717
2007-07-31 11:00:19 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
f1ee2d0687 Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.

As a result of this bug 'SELECT AGGREGATE_FUNCTION(fld) ... GROUP BY'
can return one row instead of an empty result set.

When GROUP BY only has fields of constant tables
(with a single row), the optimizer deletes the group_list.
After that we lose the information about whether we had an
GROUP BY statement. Though it's important
as SELECT min(x) from empty_table; and
   SELECT min(x) from empty_table GROUP BY y; have to return
different results - the first query should return one row,
second - an empty result set.
So here we add the 'group_optimized_away' flag to remember this case
when GROUP BY exists in the query and is removed
by the optimizer, and check this flag in end_send_group()
2007-07-31 10:46:04 +05:00
malff/marcsql@weblab.(none)
be83a97fa6 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-cleanup
2007-07-30 23:04:07 -06:00
malff/marcsql@weblab.(none)
edf784f444 Fixed ressource leak when activation of LOGGER failed. 2007-07-30 23:01:44 -06:00
cbell/Chuck@mysql_cab_desk.
ac1767df09 WL#3228 (NDB) : RBR using different table defs on slave/master
Minor refactoring to remove compile warnings and possibly fix the
Solaris test failures.
2007-07-30 17:39:54 -04:00
kent@kent-amd64.(none)
fd3b865149 Merge mysql.com:/home/kent/bk/config_h/mysql-5.0-build
into  mysql.com:/home/kent/bk/config_h/mysql-5.1-build
2007-07-30 21:45:06 +02:00
kent@kent-amd64.(none)
01ad489356 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/config_h/mysql-5.0-build
2007-07-30 21:40:13 +02:00
tsmith@ramayana.hindu.god
950a482a4b mysqld_safe.sh:
Post-review fix, if 'logger' can't be found, and --syslog is requested, exit with error message instead of fall back to logging to error file.
2007-07-30 13:35:36 -06:00
kent@mysql.com/kent-amd64.(none)
a9d2569cba Generate "config.h" directly into the "include" directory, later copied
to "my_config.h". Not to pollute the top directory, and to get more control
over what is included. Made the include path for "libedit" pick up its own
"config.h" first.
2007-07-30 21:09:45 +02:00
kent@kent-amd64.(none)
a0571dedb3 Merge mysql.com:/home/kent/bk/config_h/mysql-4.1-build
into  mysql.com:/home/kent/bk/config_h/mysql-5.0-build
2007-07-30 20:42:30 +02:00
kent@mysql.com/kent-amd64.(none)
e99df6fd02 my_pthread.c:
Backport of correction for Mac OS X build problem, global variable not
  initiated is "common" and can't be used in shared libraries, unless
  special flags are used (bug#26218)
2007-07-30 20:40:49 +02:00
omer@linux.site
ce5044072e Merge obarnir@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  linux.site:/home/omer/source/jrg51
2007-07-30 11:09:37 -07:00
serg@janus.mylan
ffecd80394 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-07-30 19:57:04 +02:00
serg@janus.mylan
f451ac1f96 handler::ha_write_row_no_binlog() hack removed,
existing table->no_replicate code is used instead
2007-07-30 19:56:02 +02:00
cbell/Chuck@mysql_cab_desk.
11fc097e8d WL#3915 : (NDB) master's cols > slave
Corrective patch to fix test failures in pushbuild and add assertions
to help debug rpl_extraColmaster test failures.
2007-07-30 12:55:26 -04:00
gshchepa/uchum@gleb.loc
15f3fb072d Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-30 21:11:49 +05:00
gshchepa/uchum@gleb.loc
9200be40ea bigint.test:
Fixing a typo in the test case.
2007-07-30 21:05:56 +05:00
gkodinov/kgeorge@magare.gmz
cfbfb8bae8 (Pushing for Andrei)
Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt
2007-07-30 19:02:21 +03:00
cbell/Chuck@mysql_cab_desk.
0950f6435c WL#3915 : (NDB) master's cols > slave
Changed test to enable easier debugging.
2007-07-30 11:59:05 -04:00
omer@linux.site
971bc31dea Merge linux.site:/home/omer/source/bld50_0724
into  linux.site:/home/omer/source/jrg51
2007-07-30 08:37:33 -07:00
gkodinov/kgeorge@magare.gmz
9a0e6ec6d2 (pushing for Andrei)
Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
  
Once had been set the flag might later got reset inside of a stored routine 
execution stack.
The reason was in that there was no check if a new statement started at time 
of resetting.
The artifact affects most of binlogable DML queries. Notice, that multi-update 
is wrapped up within
  bug@27716 fix, multi-delete bug@29136.
  
Fixed with saving parent's statement flag of whether the statement modified 
non-transactional table, and unioning (merging) the value with that was gained 
in mysql_execute_command.
  
Resettling thd->no_trans_update members into thd->transaction.`member`;
Asserting code;
Effectively the following properties are held.
  
1. At the end of a substatement thd->transaction.stmt.modified_non_trans_table
   reflects the fact if such a table got modified by the substatement.
   That also respects THD::really_abort_on_warnin() requirements.
2. Eventually thd->transaction.stmt.modified_non_trans_table will be computed as
   the union of the values of all invoked sub-statements.
   That fixes this bug#27417;

Computing of thd->transaction.all.modified_non_trans_table is refined to base to 
the stmt's value for all the case including insert .. select statement which 
before the patch had an extra issue bug@28960.
Minor issues are covered with mysql_load, mysql_delete, and binloggin of insert in
to temp_table select. 
  
The supplied test verifies limitely, mostly asserts. The ultimate testing is defered
for bug@13270, bug@23333.
2007-07-30 18:27:36 +03:00
anozdrin/alik@ibm.
5a6875619e Disable IM tests. 2007-07-30 19:23:53 +04:00
cbell/Chuck@mysql_cab_desk.
aa36211b28 WL#3228 (NDB) : RBR using different table defs on slave/master
This patch includes changes to result files for tests issuing BINLOG
queries. The values have changed due to a size difference in the
table map.
2007-07-30 10:22:42 -04:00
evgen@moonbone.local
002696b648 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/24989-bug-5.0-opt-mysql
2007-07-30 18:10:34 +04:00
evgen@moonbone.local
8de5603d1d Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
When innodb detects a deadlock it calls ha_rollback_trans() to rollback the 
main transaction. But such action isn't allowed from inside of triggers and
functions. When it happen the 'Explicit or implicit commit' error is thrown
even if there is no commit/rollback statements in the trigger/function. This
leads to the user confusion.

Now the convert_error_code_to_mysql() function doesn't call the 
ha_rollback_trans() function directly but rather calls the
mark_transaction_to_rollback function and returns an error.
The sp_rcontext::find_handler() now doesn't allow errors to be caught by the
trigger/function error handlers when the thd->is_fatal_sub_stmt_error flag
is set. Procedures are still allowed to catch such errors.
The sp_rcontext::find_handler function now accepts a THD handle as a parameter.
The transaction_rollback_request and the is_fatal_sub_stmt_error flags are 
added to the THD class. The are initialized by the THD class constructor.
Now the ha_autocommit_or_rollback function rolls back main transaction
when not in a sub statement and the thd->transaction_rollback_request
is set.
The THD::restore_sub_statement_state function now resets the 
thd->is_fatal_sub_stmt_error flag on exit from a sub-statement.
2007-07-30 17:14:34 +04:00
gkodinov/kgeorge@magare.gmz
b6bb988d12 Moved the DBUG_ASSERT from bug 28983 to
a place where it would not obstruct
correct multithreading.
2007-07-30 16:03:52 +03:00
kent@kent-amd64.(none)
038357dd43 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/tmp3/mysql-5.0-build
2007-07-30 13:38:40 +02:00
mats@kindahl-laptop.dnsalias.net
23857a5804 WL#3228 (RBR using different table defs on slave/master):
Fixing tests and results to work when replicating to fewer columns on
slave than on master. One test that previously should fail, now works,
and some log positions have changed as a result of adding metadata to
the events.
2007-07-30 13:32:15 +02:00
kostja@bodhi.(none)
80b48aea43 Fix a compilation warning. 2007-07-30 14:22:29 +04:00
anozdrin/alik@ibm.
94820f1976 Fix merge: update result files. 2007-07-30 14:03:47 +04:00
joerg@trift2.
79a90dad8e Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-30 11:18:50 +02:00
joerg@trift2.
315ece5d8f Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2007-07-30 11:15:14 +02:00
monty@mysql.com/nosik.monty.fi
b16289a5e0 Slow query log to file now displays queries with microsecond precission
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime()  (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
2007-07-30 11:33:50 +03:00
monty@mysql.com/nosik.monty.fi
a33c863ffd Add 'extension' field to all client library structures to make them extensible
Reorder structure elements to make structures smaller and faster on 64 bit systems
This is a first step in cleaning up the client include files (but should be enough to allow us to do future fixes without breaking the library)
This change is part of WL#2872,  Make client library extensible.
2007-07-30 06:22:25 +03:00
gshchepa/uchum@gleb.loc
1eb20fc0a5 Fixed bug #30120.
SP with local variables with non-ASCII names crashed the server.

The server replaces SP local variable names with NAME_CONST calls
when putting statements into the binary log. It used UTF8-encoded
item names as variable names for the replacement inside NAME_CONST
calls. However, statement string may be encoded by any
known character set by the SET NAMES statement.
The server used byte length of UTF8-encoded names to increment
the position in the query string that led to array index overrun.
2007-07-30 04:35:16 +05:00
gshchepa/uchum@gleb.loc
ccf9f9ed24 disabled.def:
ddl_i18n_koi8r.test has been disabled to ignore bug #30120.
2007-07-30 03:20:45 +05:00
cbell/Chuck@mysql_cab_desk.
537c23e833 WL#3228 (NDB) : RBR using different table defs on slave/master
This patch adds the ability to store extra field metadata in the table
map event. This data can include pack_length() or field_lenght() for
fields such as CHAR or VARCHAR enabling developers to add code that
can check for compatibilty between master and slave columns. More 
importantly, the extra field metadata can be used to store data from the
master correctly should a VARCHAR field on the master be <= 255 bytes 
while the same field on the slave is > 255 bytes. 

The patch also includes the needed changes to unpack to ensure that data
which is smaller on the master can be unpacked correctly on the slave.

WL#3915 : (NDB) master's cols > slave

Slave starts accepting and handling rows of master's tables which have more columns.
The most important part of implementation is how to caclulate the amount of bytes to
skip for unknown by slave column.
2007-07-29 18:10:42 -04:00
mats@kindahl-laptop.dnsalias.net
8f01f9d02c Merge kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
into  kindahl-laptop.dnsalias.net:/home/bk/b27972-mysql-5.1-rpl
2007-07-29 20:04:07 +02:00
gshchepa/uchum@gleb.loc
898a0fbf8d sp_head.cc:
Post-merge fix.
2007-07-29 21:12:54 +05:00
thek@adventure.(none)
64c5f996d1 Clean up patch
- Removed unused variable.
2007-07-29 14:05:03 +02:00
thek@adventure.(none)
a8f5ca9f28 Cleanup patch
- Removed unused variable.
2007-07-29 14:01:16 +02:00
thek@adventure.(none)
abe6906bf6 Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
2007-07-29 13:08:21 +02:00