Commit graph

8414 commits

Author SHA1 Message Date
unknown
85593e9079 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg5888
2004-11-24 13:04:14 +03:00
unknown
dfd6ebb153 A small cleanup in sql_select.h
sql/sql_select.h:
  Remove double assingment of fields_list.
2004-11-24 12:49:00 +03:00
unknown
c3da2d12f7 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).


mysql-test/r/trigger.result:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
mysql-test/t/trigger.test:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
sql/item.cc:
  Item_trigger_field::setup_field() now returns void. If any error
  will occur we will report it at fix_fields() stage.
sql/item.h:
  Item_trigger_field:
  - Added next_trg_field member for linking all such objects in trigger
    in one list.
  - Also setup_field() now returns void. If any error will occur we will
    report it at fix_fields() stage.
sql/mysql_priv.h:
  Added SQL_LIST::push_back() method which allows to add another SQL_LIST
  to the end of this SQL_LIST.
sql/sp_head.cc:
  sp_head::init()/reset_lex()/restore_lex():
   In order to fill global LEX::trg_table_fields (list of all 
   Item_trigger_field objects for trigger) we should init the same list
   in LEX of substatement before its parsing and merge it to global list
   after parsing.
sql/sp_head.h:
  sp_instr_trigger_field:
    Made trigger_field member public to be able to add it more easily to
    global list of all Item_trigger_field objects in trigger.
sql/sql_lex.cc:
  LEX::trg_table was removed.
sql/sql_lex.h:
  Now we are binding Item_trigger_field's to TABLE object by passing
  through specially constructed list of all such objects in this trigger
  instead of doing this during trigger definition parsing at table open.
  So we no longer need LEX::trg_table, we use LEX::trg_table_fields list
  instead.
sql/sql_parse.cc:
  mysql_execute_command():
    Since now we use trigger body for some checks in
    mysql_create_or_drop_trigger() we should destroy it only
    after calling this function.
sql/sql_trigger.cc:
  Now instead of binding Item_trigger_field to TABLE objects during
  trigger definition parsing at table open, we perform pass through
  special list of all such objects in trigger. This allows easily check
  all references to fields in old/new version of row in trigger during
  execution of CREATE TRIGGER statement (this is more courtesy for users
  since we can't check everything anyway).
  We also report that such reference is bad by returning error from
  Item_trigger_field::fix_fields() method (instead of setup_field())
  This means that if trigger is broken we will bark during trigger
  execution instead of trigger definition parsing at table open.
  (i.e. now we allow to open tables with broken triggers).
  
  Table_triggers_list::prepare_old_row_accessors() method was added to be
  able to reuse code creating Field objects referencing TABLE::record[1]
  buffer instead of TABLE::record[0].
sql/sql_trigger.h:
  Added Table_triggers_list::prepare_old_row_accessors() method to be
  able to reuse code creating Field objects referencing to TABLE::record[1]
  instead of record[0].
sql/sql_yacc.yy:
  Now instead of performing binding of Item_trigger_field objects
  to TABLE object during trigger definition parsing at table open,
  we perform this binding by passing through specially constructed
  list of all such items in trigger.
  We also check value returned from memory allocation functions.
2004-11-24 12:24:02 +03:00
unknown
02b0e43089 ha_myisammrg was missing index_type() method bug#6756
sql/ha_myisammrg.cc:
  ha_myisammrg was missing index_type() method
sql/ha_myisammrg.h:
  ha_myisammrg was missing index_type() method
2004-11-23 22:57:04 +01:00
unknown
87ec5e46cd Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2004-11-23 22:21:04 +01:00
unknown
ebf164b88e Fix compiler warnings on some systems. (Unused variables)
Fixed bug in DROP FUNCTION for UDFs.
Note: It still doesn't work properly, but that bug is somewhere else.


sql/sp.cc:
  Fix compiler warning on some systems. (Unused variable)
sql/sql_parse.cc:
  Fix compiler warning on some systems. (Unused variable)
  Fixed bug in DROP FUNCTION for UDFs.
  Note: It still doesn't work properly, but that bug is somewhere else.
2004-11-23 19:19:09 +01:00
unknown
7802ba97b4 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2004-11-23 16:34:27 +01:00
unknown
bbfc702ddb don't crash when trp=0 2004-11-23 16:28:51 +01:00
unknown
555e0e444f Merge serg.mylan:/usr/home/serg/Abk/mysql-4.1
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/mysqld.cc:
  Auto merged
2004-11-23 15:50:29 +01:00
unknown
3afa86dc34 More test cases are added
Fixed bug 'using of alias with information schema tables in views'
removed compiler warnings


mysql-test/r/information_schema.result:
  More test cases are added
mysql-test/t/information_schema.test:
  More test cases are added
sql/sql_select.cc:
  Fixed bug 'using of alias with information schema tables in views'
sql/sql_show.cc:
  Fixed bug 'using of alias with information schema tables in views'
  Changed length of some columns
sql/table.h:
  Fixed bug 'using of alias with information schema tables in views'
tests/client_test.c:
  Changed length of some columns
2004-11-23 17:41:39 +03:00
unknown
4039df00d0 Merge mysql.com:/home/wax/mysql/mysql-4.1
into mysql.com:/home/wax/mysql/mysql-4.1bug


sql/mysqld.cc:
  Auto merged
2004-11-23 17:58:46 +05:00
unknown
14769b681c rename event_connect_request to smem_event_connect_request 2004-11-23 17:55:07 +05:00
unknown
8941ac5685 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/sql_table.cc:
  Auto merged
2004-11-22 22:58:34 +01:00
unknown
6627dc7d1b merged
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
Docs/Support/texi2html:
  Auto merged
client/mysqltest.c:
  Auto merged
innobase/lock/lock0lock.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/rpl000015.result:
  Auto merged
mysql-test/r/rpl_log_pos.result:
  Auto merged
mysql-test/r/rpl_rotate_logs.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/t/key.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/rpl000015.test:
  Auto merged
mysql-test/t/rpl_log_pos.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_do.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-11-22 21:33:15 +01:00
unknown
443143f334 typo fixed 2004-11-22 20:50:04 +01:00
unknown
1dc1ad9c9a Bug#6252 - Duplicate columns in keys should fail
Added check for duplicate column in key
  Added tests and fixed tests which exploit bug


mysql-test/r/delete.result:
  Fix test as it exploited Bug#6252
mysql-test/r/innodb.result:
  Test for Bug#6126
mysql-test/r/key.result:
  Test for Bug#6126/6252
mysql-test/r/type_blob.result:
  Fix test as it exploited Bug#6252
mysql-test/t/delete.test:
  Fix test as it exploited Bug#6252
mysql-test/t/innodb.test:
  Test for Bug#6126
mysql-test/t/key.test:
  Test for Bug#6126/6252
mysql-test/t/type_blob.test:
  Fix test as it exploited Bug#6252
sql/sql_table.cc:
  Bug#6252 - Duplicate columns in keys should fail
    Added check for duplicate column.
2004-11-22 18:07:04 +00:00
unknown
c8a30eb0c6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-11-22 14:55:20 +01:00
unknown
01604355ac Bug #6748 heap_rfirst() doesn't work (and never did!)
range for BETWEEN typo fixed


extra/perror.c:
  meaningless error message fixed
heap/hp_rfirst.c:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
mysql-test/r/heap.result:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
mysql-test/r/range.result:
  range for BETWEEN typo fixed
mysql-test/t/heap.test:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
sql/handler.cc:
  Bug #6748 heap_rfirst() doesn't work (and never did!)
sql/sql_select.cc:
  range for BETWEEN typo fixed
2004-11-22 14:53:18 +01:00
unknown
6c81b518c0 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1
2004-11-22 12:02:32 +01:00
unknown
f72b5978c4 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6462


sql/set_var.cc:
  Auto merged
2004-11-22 13:06:31 +03:00
unknown
4389be7557 Fix for bug #6462 "Same request on same data returns different
results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
statements". (Version #2 with after-review fixes).

To perform proper cleanup for statements that can contain subqueries 
but don't have main select we must call free_undelaid_joins().


mysql-test/r/subselect.result:
  Added test for bug #6462 "Same request on same data returns different
  results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
  statements".
mysql-test/t/subselect.test:
  Added test for bug #6462 "Same request on same data returns different
  results." a.k.a. "Proper cleanup of subqueries is missing for SET and DO
  statements".
sql/set_var.cc:
  Added missing cleanup of joins used in subqueries to SET statement.
sql/sql_do.cc:
  Added missing cleanup of joins used in subqueries to DO statement.
2004-11-22 13:05:10 +03:00
unknown
5672598f0a Added checks for NOT NULL for all fields in UNIQUE INDEX (USING HASH) 2004-11-22 10:35:03 +01:00
unknown
6d6b38c27f Bug #6737: REGEXP gives wrong result with case sensitive collation:
- A new flag MY_CS_CSSORT was introduced for case sensitivity.
- Item_func_regexp doesn't substiture ICASE not only
  for binary collations but for case sensitive collations as well.
2004-11-22 11:58:40 +04:00
unknown
00e79db8ac postreview changes
include/mysqld_error.h:
  checksum error message
sql/share/czech/errmsg.txt:
  checksum error message
sql/share/danish/errmsg.txt:
  checksum error message
sql/share/dutch/errmsg.txt:
  checksum error message
sql/share/english/errmsg.txt:
  checksum error message
sql/share/estonian/errmsg.txt:
  checksum error message
sql/share/french/errmsg.txt:
  checksum error message
sql/share/german/errmsg.txt:
  checksum error message
sql/share/greek/errmsg.txt:
  checksum error message
sql/share/hungarian/errmsg.txt:
  checksum error message
sql/share/italian/errmsg.txt:
  checksum error message
sql/share/japanese/errmsg.txt:
  checksum error message
sql/share/korean/errmsg.txt:
  checksum error message
sql/share/norwegian-ny/errmsg.txt:
  checksum error message
sql/share/norwegian/errmsg.txt:
  checksum error message
sql/share/polish/errmsg.txt:
  checksum error message
sql/share/portuguese/errmsg.txt:
  checksum error message
sql/share/romanian/errmsg.txt:
  checksum error message
sql/share/russian/errmsg.txt:
  checksum error message
sql/share/serbian/errmsg.txt:
  checksum error message
sql/share/slovak/errmsg.txt:
  checksum error message
sql/share/spanish/errmsg.txt:
  checksum error message
sql/share/swedish/errmsg.txt:
  checksum error message
sql/share/ukrainian/errmsg.txt:
  checksum error message
sql/sql_table.cc:
  fixed layout
  fixed comment
  allow cocalization of error
2004-11-21 16:35:42 +02:00
unknown
3507a52e60 A fix and test case for Bug#6297 "prepared statement, wrong handling
of <parameter> IS NULL":
we must not only set Item::null_value in Item_param, but implement
Item_param::is_null() to work well with IS NULL/IS NOT NULL clauses.


mysql-test/r/ps.result:
  Test case for Bug#6297: test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#6297 "prepared statement, wrong handling of 
  <parameter> IS NULL"
sql/item.h:
  A fix for Bug#6297: we must not only set null_value in Item_param, but
  also implement Item_param::is_null() to work well with  IS NULL/
  IS NOT NULL.
  Item::is_null() commented.
2004-11-21 12:04:27 +03:00
unknown
b3c9963971 merge
sql/handler.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
2004-11-21 10:12:11 +02:00
unknown
5e53947da8 post-merge fix 2004-11-20 20:19:08 +01:00
unknown
7b0069ee20 merged
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
client/Makefile.am:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
configure.in:
  Auto merged
include/my_time.h:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/include/fil0fil.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
tests/client_test.c:
  Auto merged
2004-11-20 18:36:41 +01:00
unknown
15092975f5 changed field names, fields order according to WL description
fixed bug: "create view v7 as select * from information_schema.tables;" failed


mysql-test/r/information_schema.result:
  changed field names, fields order according to WL description
mysql-test/t/information_schema.test:
  changed field names, fields order according to WL description
sql/sql_show.cc:
  changed field names, fields order according to WL description
sql/sql_view.cc:
  fixed bug: "create view v7 as select * from information_schema.tables;" failed
tests/client_test.c:
  changed field names, fields order according to WL description
2004-11-20 01:17:18 +03:00
unknown
a3740c887e Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6266
2004-11-19 21:51:37 +03:00
unknown
79997ff7bd Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6439
2004-11-19 21:38:51 +03:00
unknown
7c0504ad17 Manual merge of fix for bug #6439 "from_unixtime() function returns
wrong datetime values for too big argument" from 4.0 tree to 4.1 tree.


mysql-test/r/func_time.result:
  Manual merge
mysql-test/t/func_time.test:
  Manual merge
sql/item_timefunc.cc:
  Manual merge
2004-11-19 19:19:45 +03:00
unknown
7368b14719 Manual merge of fix for bug #6266 "Invalid DATETIME value is not handled
properly" with main tree.


libmysql/libmysql.c:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
tests/client_test.c:
  Manual merge.
2004-11-19 18:35:36 +03:00
unknown
aa6785d7a8 Bug #6658 MAX(column) returns incorrect coercibility
Also, Item_sum_hybrid->charset was removed as redundant,
and switched to use collation.collation instead.


mysql-test/r/func_group.result:
  Bug #6658 MAX(column) returns incorrect coercibility
mysql-test/r/func_str.result:
  Bug #6658 MAX(column) returns incorrect coercibility
mysql-test/t/func_group.test:
  Bug #6658 MAX(column) returns incorrect coercibility
sql/item_func.cc:
  Bug #6658 MAX(column) returns incorrect coercibility
sql/item_sum.cc:
  Bug #6658 MAX(column) returns incorrect coercibility
sql/item_sum.h:
  Bug #6658 MAX(column) returns incorrect coercibility
2004-11-19 19:35:36 +04:00
unknown
801a2fa308 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg6439
2004-11-19 17:54:14 +03:00
unknown
d6407c760e ha_ndbcluster.cc:
merge error


sql/ha_ndbcluster.cc:
  merge error
2004-11-19 09:27:16 +00:00
unknown
5381a881e1 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-11-19 09:18:36 +00:00
unknown
fb36bc2a43 log_event.cc:
post-conflict-merge fix (duplicate comment)


sql/log_event.cc:
  post-conflict-merge fix (duplicate comment)
2004-11-19 00:57:26 +01:00
unknown
3ef38a3732 moved ndb_use_transactions out of opts and to be set default true in THD::init 2004-11-18 22:45:48 +00:00
unknown
31914653cd Merge
sql/log_event.cc:
  SCCS merged
2004-11-18 23:31:23 +01:00
unknown
f336c62a44 When mysqlbinlog prints LOAD DATA INFILE, let it print the thread id. Some customer would have benefited
much from this in his recovery. All this change does is adding one commented (#) line before the LOAD DATA
command, so it is quite innocuous.
2004-11-18 22:59:17 +01:00
unknown
f7164c732b Merge
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster.cc:
  SCCS merged
2004-11-18 21:54:53 +00:00
unknown
f39d77fdfc coding style fix 2004-11-18 19:06:02 +03:00
unknown
29d84f73de Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
2004-11-18 15:55:18 +01:00
unknown
17582bc0e6 Merge mysql.com:/home/cps/mysql/trees/mysql-5.0
into mysql.com:/home/cps/mysql/devel/innotask/mysql-5.0-inno-final
2004-11-18 16:49:13 +03:00
unknown
e1f5b3f926 Merge mysql.com:/home/cps/mysql/trees/mysql-5.0
into mysql.com:/home/cps/mysql/devel/innotask/mysql-5.0-inno-final


sql/ha_innodb.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/structs.h:
  Auto merged
2004-11-18 14:53:21 +03:00
unknown
be5b6f4d4b Fix for bug#4312 ndb table, wrong behaviour on insert .. on duplicate key .. 2004-11-18 12:11:56 +01:00
unknown
006448b90d Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/space/pekka/ndb/version/my41


sql/ha_ndbcluster.cc:
  Auto merged
2004-11-18 11:55:53 +01:00
unknown
4dac69eb11 WL 2059 Engine-specific status variables framework and WL 1922
InnoDB status variables


innobase/buf/buf0buf.c:
  Added function to get the number of latched pages
innobase/buf/buf0flu.c:
  Added support for dblwr_pages_written, dblwr_writes and
  buffer_pool_pages_flushed status variables
innobase/buf/buf0lru.c:
  Added support for _buffer_pool_wait_free status variable
innobase/buf/buf0rea.c:
  Added support for buffer_pool_read_ahead_rnd, buffer_pool_read_ahead_seq
  and srv_buf_pool_reads status variables
innobase/fil/fil0fil.c:
  Added support for os_log_fsyncs, data_read, and data_written
innobase/include/buf0buf.h:
  Functions and variables needed for new status variables declared
innobase/include/buf0flu.ic:
  Added support for buffer_pool_write_requests status variable
innobase/include/fil0fil.h:
  Variable declared
innobase/include/os0file.h:
  Declared several variabled
innobase/include/srv0srv.h:
  Declared all new variables needed for InnoDB status variables
innobase/log/log0log.c:
  Added support for various log-related status variables
innobase/os/os0file.c:
  Added support for pending_writes, pending_reads status variables
innobase/srv/srv0srv.c:
  Added internal counters and function to accumulate information for
  InnoDB status variables
mysql-test/r/innodb.result:
  result fot the test
mysql-test/t/innodb.test:
  We have tests only for few variables, as we cannot predict value for
  most of the added variables. It depends on the system load, OS, HDD
  e.t.c Thus, we cannot test them with mysql-test.
sql/ha_innodb.cc:
  Added an array for InnoDB status variables. This is part of the
  WL2059 Engine-specific status variables framework
sql/ha_innodb.h:
  Declared status variables array and the function to refresh statistics
sql/handler.cc:
  Added function to get statistics
sql/handler.h:
  Declared function to update handlers statistics
sql/mysql_priv.h:
  declared opt_innodb to see it from handlers
sql/mysqld.cc:
  Don't include Innodb_*  status variables into "show status" if we
  are compiling without InnoDB
sql/sql_show.cc:
  mysqld_show modified and split into two parts to support enclosed
  arrays in the show_var_st structure. This is a part of
  WL2059 Engine-specific status variables framework.
sql/structs.h:
  Added new value to mark enclosed array in the status variables array
2004-11-18 13:00:42 +03:00
unknown
703c498f96 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-grind
2004-11-18 11:24:51 +02:00