Commit graph

11089 commits

Author SHA1 Message Date
unknown
313761cb40 Ensure that privileges are tested properly for multi-table-updates.
Now one need only SELECT privilege for tables that are only read in
UPDATE statements with many tables. (Bug #2377).


sql/sql_acl.cc:
  Comment cleanup
sql/sql_parse.cc:
  Merged duplicate code.
  Removed some outdated 'tables->db' tests.
  Check privileges for multi-updates properly (Bug #2377)
sql/sql_show.cc:
  Remove disabled code
sql/sql_update.cc:
  Ensure that privileges are tested properly for multi-table-updates
tests/grant.pl:
  Added more tests
tests/grant.res:
  updated results
2004-02-03 19:17:23 +01:00
unknown
ec76183bec Added new option --sync-frm / --skip-sync-frm
Marked --bdb-no-sync as deprecated
Added --sync-bdb-logs / --disable-sync-bdb-logs as a synonym / alternative.


mysys/my_getopt.c:
  Changed my_getopt so that disabled_my_option can be used for
  GET_BOOL type options too.
sql/mysql_priv.h:
  Added opt_sync_frm
sql/mysqld.cc:
  Added sync-frm / disable-sync-frm to mysqld, to be able to disable
  use of my_sync() (fsync()). This defaults to behavior in 4.0.16
  and before, where creating of new tables is quicker than currently.
  This option is enabled by default.
  
  Marked --bdb-no-sync as deprecated option and added another one,
  --sync-bdb-logs besides. --bdb-no-sync and --disabled-sync-bdb-logs
  are now synonyms.
sql/unireg.cc:
  One can disable my_sync() by using --disable-sync-frm
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-02-03 18:10:45 +00:00
unknown
cbda6835ed clean up comments 2004-02-03 18:21:48 +04:00
unknown
786a5b6bc3 Bug #2619 ucs2 LIKE comparison fails in some cases 2004-02-03 18:14:23 +04:00
unknown
2dc266aff4 another variant (bug #2185: mysql.server script echo bug) 2004-02-03 16:45:29 +04:00
unknown
d7d012046c .del-mytest-old.c~5237697b30cf59e4:
Delete: mytest-old.c


BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
  Delete: mytest-old.c
2004-02-03 13:44:56 +01:00
unknown
453a32e927 Code cleanup:
we don't need opt_range.h and opt_range.cc files at all.


BitKeeper/deleted/.del-opt_ft.cc~2048ffa561f9c59:
  Delete: sql/opt_ft.cc
BitKeeper/deleted/.del-opt_ft.h~24aac1d29304599a:
  Delete: sql/opt_ft.h
2004-02-03 14:35:24 +04:00
unknown
92bcbf9a43 Thai tis620 crash problem in text comparison routines was fixed. 2004-02-03 14:03:01 +04:00
unknown
715e7a63a6 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b2419
2004-02-03 12:47:34 +04:00
unknown
619eaee654 Give error if locked table is used twice in query. This fixes strange error message when doing LOCK TABLES t1 WRITE; INSERT TABLE t1 SELECT * from t1 (Bug #2296)
client/mysqldump.c:
  Better help for flush-logs
mysql-test/r/lock.result:
  Test for LOCK TABLES ; INSERT ... SELECT
mysql-test/t/lock.test:
  Test for LOCK TABLES ; INSERT ... SELECT
2004-02-03 09:46:48 +01:00
unknown
0058d24da4 Merge vvagin@bk-internal.mysql.com:/home/bk/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2438/mysql-4.1
2004-02-03 01:19:04 +04:00
unknown
bfadd733ac Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.1
into eagle.mysql.r18.ru:/home/vva/work/BUG_2438/mysql-4.1
2004-02-03 01:16:08 +04:00
unknown
bbdba29229 changed allocation of st_table::insert_values
from table->mem_root to thd->mem_root 
(fixed bug #2438 "Runaway memory consumption")
2004-02-03 01:07:43 +04:00
unknown
e0b0ec6b2c Proposed (version #2) fix for bug #1948:
"system variable query_prealloc_size can be only global"


include/my_sys.h:
  Fix for bug #1948:
  - added reset_root_defaults function declaration
mysys/my_alloc.c:
  Fix for bug #1948:
  - implementation and description of reset_root_defaults
sql/set_var.cc:
  Fix for bug #1948:
  - fix_thd_mem_root and fix_trans_mem_root after update triggers
    implemented for variables query_prealloc_size, query_alloc_block_size,
    trans_prealloc_size, trans_alloc_block_size
2004-02-02 23:01:58 +03:00
unknown
2d06a32a57 rpl_log.result:
a result file for a fix for bug #2557
rpl_log.test:
  A test case for a fix for bug #2557


mysql-test/t/rpl_log.test:
  A test case for a fix for bug #2557
mysql-test/r/rpl_log.result:
  a result file for a fix for bug #2557
2004-02-02 21:34:04 +02:00
unknown
d9b55b6ed9 sql_table.cc:
Fix for a bug #2557 which caused that MySQL 4.1.2 does not replicate CREATE TABLE ... LIKE ..


sql/sql_table.cc:
  Fix for a bug #2557 which caused that MySQL 4.1.2 does not replicate CREATE TABLE ... LIKE ..
2004-02-02 21:20:10 +02:00
unknown
af6141b2f8 increase the size of a signal thread's stack (the old one was too small for the thread to be created on some systems)
bug#2599
2004-02-02 19:32:05 +01:00
unknown
f1bfba29d4 just tried to find all 'skipp' and replace it with 'skip'.
client/sql_string.cc:
  skipp -> skip
dbug/dbug.c:
  skipp -> skip
myisam/mi_create.c:
  skipp -> skip
myisam/mi_dynrec.c:
  skipp -> skip
myisam/mi_packrec.c:
  skipp -> skip
myisam/mi_rrnd.c:
  skipp -> skip
myisam/mi_test1.c:
  skipp -> skip
myisam/myisampack.c:
  skipp -> skip
myisam/rt_test.c:
  skipp -> skip
myisam/sp_test.c:
  skipp -> skip
mysys/default.c:
  skipp -> skip
mysys/mf_iocache.c:
  skipp -> skip
mysys/mf_pack.c:
  skipp -> skip
mysys/mf_wcomp.c:
  skipp -> skip
mysys/typelib.c:
  skipp -> skip
sql/filesort.cc:
  skipp -> skip
sql/item_strfunc.cc:
  skipp -> skip
sql/mysqld.cc:
  skipp -> skip
sql/opt_range.h:
  skipp -> skip
sql/sql_delete.cc:
  skipp -> skip
sql/sql_select.cc:
  skipp -> skip
sql/sql_string.cc:
  skipp -> skip
sql/sql_update.cc:
  skipp -> skip
strings/ctype-bin.c:
  skipp -> skip
strings/ctype-simple.c:
  skipp -> skip
strings/r_strinstr.c:
  skipp -> skip
strings/strinstr.c:
  skipp -> skip
strings/strstr.c:
  skipp -> skip
2004-02-02 20:25:39 +04:00
unknown
f85e469eed Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b2419


sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2004-02-02 19:33:45 +04:00
unknown
8131ccaf80 Added a comment for NULL range creation. 2004-02-02 19:32:49 +04:00
unknown
883f11b68c test added 2004-02-02 15:57:57 +01:00
unknown
65534b77a1 Indexes can be used for optimization if the operation
collation is the same with the index collation.
2004-02-02 17:50:14 +04:00
unknown
b3fd7528c5 a fix (#2185: mysql.server script echo bug)
thnx Paul.                                             
              
<monty> can you get the above into configure and make Makefile.am patch         
mysql.server.sh with the right values for mysql.server ?                        
<monty> or do you think we should just put the above in mysql.server.sh directly
<ramil> as you want                                                             
<monty> the last is kind of hard to do with variables, so lets put the          
above in mysql.server.sh directly                                               
                                                                  


support-files/mysql.server.sh:
  #2185: mysql.server script echo bug
2004-02-02 15:25:20 +04:00
unknown
5a5eae1d21 Typo fixing
s/expection/exception


BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2004-02-02 12:09:47 +02:00
unknown
c91c1470c8 preload.result, key_cache.result, preload.test, key_cache.test, sql_yacc.yy:
Fixed bug #2602 in CACHE INDEX, LOAD INDEX


sql/sql_yacc.yy:
  Fixed bug #2602 in CACHE INDEX, LOAD INDEX
mysql-test/t/key_cache.test:
  Fixed bug #2602 in CACHE INDEX, LOAD INDEX
mysql-test/t/preload.test:
  Fixed bug #2602 in CACHE INDEX, LOAD INDEX
mysql-test/r/key_cache.result:
  Fixed bug #2602 in CACHE INDEX, LOAD INDEX
mysql-test/r/preload.result:
  Fixed bug #2602 in CACHE INDEX, LOAD INDEX
2004-02-02 00:19:51 -08:00
unknown
0ba7ef007e rpl_insert_id.test, rpl_insert_id.result:
Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints


mysql-test/r/rpl_insert_id.result:
  Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints
mysql-test/t/rpl_insert_id.test:
  Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints
2004-02-02 01:41:35 +02:00
unknown
2b9e174499 innodb.result, innodb.test:
Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints


mysql-test/t/innodb.test:
  Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints
mysql-test/r/innodb.result:
  Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints
2004-02-02 01:30:59 +02:00
unknown
1b8d5ca887 dict0dict.c:
Change print format of FOREIGN KEY constraints spanning multiple databases to <backquote>databasename<backquote>.<backquote>tablename<backquote>; but when parsing them we must also accept <backquote>databasename.tablename<backquote>, because that was the output format in < 4.0.18


innobase/dict/dict0dict.c:
  Change print format of FOREIGN KEY constraints spanning multiple databases to <backquote>databasename<backquote>.<backquote>tablename<backquote>; but when parsing them we must also accept <backquote>databasename.tablename<backquote>, because that was the output format in < 4.0.18
2004-02-02 01:05:53 +02:00
unknown
2cac1f4d33 dict0dict.c:
Change print format of FOREIGN KEY constraints spanning multiple databases to: .; but we when parsing them we must also accept , because that was the output format in < 4.0.18


innobase/dict/dict0dict.c:
  Change print format of FOREIGN KEY constraints spanning multiple databases to: .; but we when parsing them we must also accept , because that was the output format in < 4.0.18
2004-02-02 01:03:05 +02:00
unknown
08177508f5 dict0dict.c:
Remove redundant code; parse both the database name and the table name in a FOREIGN KEY constraint with quotes in mind
row0mysql.c, ha_innodb.cc, sql_table.cc:
  Return error message Cannot delete or update a parent row... if we try to drop a table which is referenced by a FOREIGN KEY constraint, and the user has not set foreign_key_checks=0


sql/sql_table.cc:
  Return error message Cannot delete or update a parent row... if we try to drop a table which is referenced by a FOREIGN KEY constraint, and the user has not set foreign_key_checks=0
sql/ha_innodb.cc:
  Return error message Cannot delete or update a parent row... if we try to drop a table which is referenced by a FOREIGN KEY constraint, and the user has not set foreign_key_checks=0
innobase/row/row0mysql.c:
  Return error message Cannot delete or update a parent row... if we try to drop a table which is referenced by a FOREIGN KEY constraint, and the user has not set foreign_key_checks=0
innobase/dict/dict0dict.c:
  Remove redundant code; parse both the database name and the table name in a FOREIGN KEY constraint with quotes in mind
2004-02-02 00:10:45 +02:00
unknown
1f739ca45e make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
(BUG#2120 sfter merge)


mysql-test/r/derived.result:
  correct results of derived tble EXPLAIN
  test of "Using Index" with derived tables
mysql-test/t/derived.test:
  test of "Using Index" with derived tables
sql/mysql_priv.h:
  way to force derived table save JOIN after execution
sql/sql_derived.cc:
  way to force derived table save JOIN after execution
sql/sql_lex.h:
  way to force derived table save JOIN after execution
sql/sql_select.cc:
  make JOIN::prepare, JOIN::optimize only once for EXPLAIN of derived table
2004-02-01 20:07:44 +02:00
unknown
7eefcb75db dict0dict.c:
Cleanup


innobase/dict/dict0dict.c:
  Cleanup
2004-02-01 19:20:16 +02:00
unknown
00b2168b8c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1


sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2004-02-01 15:31:30 +02:00
unknown
68c0a29987 now all tables of query are locked in one place (including derived tables)
fixed BUG#2120 and other problem with EXPLAINing derived tables


mysql-test/r/derived.result:
  correct tables names & Co in derived tables
  test case for BUG#2120
mysql-test/t/derived.test:
  test case for BUG#2120
sql/mysql_priv.h:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/repl_failsafe.cc:
  correct initialization of TABLE_LIST
sql/sql_acl.cc:
  used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
sql/sql_base.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/sql_delete.cc:
  all tables processing is done during opening
sql/sql_derived.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables) to sutisfy "all query tables locking" at the moment
sql/sql_insert.cc:
  all tables processing is done during opening
  correct initialization of TABLE_LIST
sql/sql_lex.cc:
  now table list will be created for whole query
  layout fix
  correct check of updated table in subqueries
sql/sql_lex.h:
  now table list will be created for whole query
  correct check of updated table in subqueries
sql/sql_olap.cc:
  THIS FUNCTION IS USED NOWHERE
  it will be good to remove it at all (handle_olaps)
sql/sql_parse.cc:
  derived tables processing moved after open/locking all tables (in open_and_lock_tables)
sql/sql_prepare.cc:
  new creating list parameters
  all tables processing is done during opening
sql/sql_select.cc:
  all tables processing is done during opening
sql/sql_select.h:
  now it used only within file where is defined
sql/sql_udf.cc:
  used simple table opening without derived table processing to avoid unneeded initialization of SELECT_LEX
sql/sql_update.cc:
  all tables processing is done during opening
2004-02-01 15:30:32 +02:00
unknown
abc17f8f3c fix for the bug #2419: order by ignores rows.
null_ref_key moved to TABLE_REF.
new null range created if necessary.


mysql-test/r/order_by.result:
  fix for the bug #2419: order by ignores rows
mysql-test/t/order_by.test:
  fix for the bug #2419: order by ignores rows
sql/item_subselect.cc:
  fix for the bug #2419: order by ignores rows
sql/opt_range.cc:
  fix for the bug #2419: order by ignores rows
sql/sql_select.cc:
  fix for the bug #2419: order by ignores rows
sql/sql_select.h:
  fix for the bug #2419: order by ignores rows
2004-01-31 10:04:16 +04:00
unknown
ef55f2dcdb Fix for bug #2523 '"func_time" test fails on QNX'.
Moved all range checks for TIMESTAMP value to my_gmt_sec().
Also fixed check of upper boundary of TIMESTAMP range (which 
also now will catch datetime values which are too small for
TIMESTAMP in case if time_t is unsigned).  


mysql-test/r/timezone.result:
  Added test which checks if TIMESTAMP range is checked 
  correctly (current time zone is honoured and both upper 
  and lower bounds of TIMESTAMP range are checked).
mysql-test/t/timezone.test:
  Added test which checks if TIMESTAMP range is checked 
  correctly (current time zone is honoured and both upper 
  and lower bounds of TIMESTAMP range are checked).
sql/field.cc:
  Check if datetime value is in TIMESTAMP range has moved to 
  my_gmt_sec() function.
sql/mysql_priv.h:
  Added more constants for checking if datetime is in allowed
  range for TIMESTAMP.
sql/time.cc:
  Check if datetime value is in TIMESTAMP range has moved to 
  my_gmt_sec() function. Fixed check of its return value
  to catch overflows in both directions and also overflows in 
  case of unsigned time_t.
2004-01-30 19:15:11 +03:00
unknown
e95a3e3ce8 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-bg2464


sql/sql_parse.cc:
  Auto merged
2004-01-30 15:13:54 +03:00
unknown
a96ffb2925 Fix for bugs #1885, #2464, #2539. Proper handling of default
values for TIMESTAMP columns. The solution is not perfect since
we just silently ignoring default value for first TIMESTAMP 
column and properly reflecting this fact in SHOW CREATE TABLE.
We can't give a warning or simply support standard syntax 
(niladic functions as legal value for default) for first field 
since it is 4.0 tree.


mysql-test/r/type_timestamp.result:
  Added test for bugs #1885, #2464, #2539
  (proper support of default values for TIMESTAMP columns)
mysql-test/t/type_timestamp.test:
  Added test for bugs #1885, #2464, #2539
  (proper support of default values for TIMESTAMP columns)
sql/field.cc:
  Enabled copying of defaults for TIMESTAMP fields when we are 
  creating table with CREATE TABLE x (SELECT ...)
sql/field.h:
  Set proper DEFAULT value for non-first TIMESTAMP column.
sql/sql_parse.cc:
  Allowed default values for TIMESTAMP column.
sql/sql_show.cc:
  Enabled printing of default values in SHOW CREATE TABLE and 
  SHOW COLUMNS for all TIMESTAMP columns except first one.
2004-01-30 15:13:19 +03:00
unknown
8ab97bb111 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-01-30 11:31:49 +01:00
unknown
f120273dd2 Fixed parsing of column names and foreign key constraints in Innobase to handle quoted identifiers and identifiers with space. (Bug #1725)
Fix optimizer tuning bug when first used key part was a constant. (Bug #1679)


innobase/dict/dict0dict.c:
  Fixed parsing of column names and foreign key constraints to handle quoted identifiers and identifiers with space. (Bug #1725)
mysql-test/r/innodb.result:
  Test of innodb internal parsing
mysql-test/t/innodb.test:
  Test of innodb internal parsing
sql/sql_class.cc:
  Safety fix for select into outfile and select into dumpfile. Before calling send_error() could cause end_io_cache() to be called several times.
sql/sql_class.h:
  Add path to dumpfile so that we can delete the generated file if something goes wrong.
sql/sql_select.cc:
  Fix optimizer tuning bug when first used key part was a constant.
  Previously all keys that had this key part first was regarded as equal, even if the query used more key parts for some of the keys.
  Now we use the range optimizer results to just limit the number of estimated rows if not all key parts where constants.
  (Bug #1679)
2004-01-30 10:46:30 +01:00
unknown
150c99dffe cleanup 2004-01-30 08:56:32 +01:00
unknown
7bdc4c4faf incorrect fix undone, as it causes memory leaks (e.g. in key.test) 2004-01-30 08:40:01 +01:00
unknown
14ede384fe catch accesses to deleted objects
double delete bug fixed


sql/sql_list.h:
  catch accesses to deleted objects
sql/sql_union.cc:
  double delete fixed
2004-01-30 08:09:42 +01:00
unknown
a2d67665d5 SHOW CREATE DATABASE moved to sql_show.cc where it belongs
db name is printed with append_identifier for a proper quoting
2004-01-30 07:32:35 +01:00
unknown
cfc362dbc5 Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2004-01-30 06:41:37 +01:00
unknown
bbd2adf4ba Fix for BUG#2477 "Slave stop with error after master reboot if use HEAP tables":
when we open the HEAP table for the first time since server restart,
in hp_open(), we set a flag to propagate this info to the handler level
which then writes a DELETE FROM this_heap_table to the binlog.
It is not a perfect solution for the bug, because between the server start and 
the first open of the table, the slave still had old data in his table so
a SELECT on the slave may show wrong content. But if there is a --init-file
to populate the HEAP table on master as startup, then this is a safe fix
(I'll put a note about init-file in the HEAP section of the manual).


heap/hp_info.c:
  new info variable implicit_emptied
heap/hp_open.c:
  If this is the first open of the HEAP table, it means it is empty,
  so we mark it.
include/heap.h:
  new variables implicit_emptied
  (we need one in HEAPINFO for the hp_info() call).
sql/ha_heap.cc:
  report info to upper level
sql/handler.h:
  new info 'implicit_emptied' in the handler level; only HEAP uses it.
sql/sql_base.cc:
  When a HEAP table is opened for the first time, write a DELETE FROM to the binlog,
  for replication and mysqlbinlog|mysql.
  Monty: I added the
  entry->file->implicit_emptied= 0;
2004-01-30 00:05:34 +01:00
unknown
8746a25554 Fix for BUG#2527 "Multi-Table Delete - Not Replication use replicate-wild-do-table"
(as long as replicate-*-table rules were defined, multi-table DELETE was never
replicated by the slave).


sql/sql_parse.cc:
  For a multi-table DELETE, there are two lists of tables:
  - 'tables' contains the tables in the FROM. They have 'updating==0'.
  - 'thd->lex.auxilliary_table_list.first' contains the tables between the DELETE and the FROM. They have 'updating==1'.
  So the bug was that the slave only tests 'tables' and as all its elements have updating==0,
  tables_ok() always returns 0.
  So for a multi DELETE the slave now tests the 2nd list too.
  I started with the other tip of the sausage: I thought of changing multi DELETE to use
  only one list (given that 'updating' can be used to separate it in two when needed)
  (with one list we wouldn't need to change the slave code), but finally hit the unicity
  check in add_table_to_list() which started to return ER_NONUNIQ_TABLE (logical).
2004-01-29 19:22:29 +01:00
unknown
e7a336d869 Unused variable removed (cleanup spotted in bug #2214) 2004-01-29 18:27:52 +03:00
unknown
163dffb4d0 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-01-29 15:17:25 +01:00
unknown
b9073593d0 Mark that strings may change on index only reads (for BDB tables).
This fixed problem with index reads on character fields with BDB tables. (Bug #2509)


BitKeeper/etc/ignore:
  added man/*.1
mysql-test/r/bdb.result:
  New test
mysql-test/r/myisam.result:
  More tests
mysql-test/t/bdb.test:
  Test for idnex only read
mysql-test/t/myisam.test:
  More test to verify pushed bug fix
sql/ha_berkeley.h:
  Mark that strings may change on index only reads
sql/item_strfunc.cc:
  Cleanup
sql/table.cc:
  Allow index only reads on binary strings
2004-01-29 15:16:48 +01:00