Commit graph

3233 commits

Author SHA1 Message Date
unknown
2f8b0ab3a7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/item.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2004-10-22 19:51:04 +03:00
unknown
4ff9b60597 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzfix


sql/sql_parse.cc:
  Auto merged
2004-10-22 20:21:55 +04:00
unknown
bc6652db9b Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)


client/mysql.cc:
  Fix compiler warnings
client/mysqltest.c:
  Fix wrong counting of lines
  Remove compiler warnings
heap/hp_hash.c:
  Fix compiler warnings
innobase/dict/dict0load.c:
  Fix compiler warnings
innobase/include/mem0mem.h:
  Fix compiler warnings
libmysql/client_settings.h:
  Fix compiler warnings
myisam/ft_nlq_search.c:
  Add comments about compiler warnings
myisam/rt_index.c:
  Add comments about compiler warnings
myisam/rt_mbr.c:
  Add comments about compiler warnings
mysql-test/r/ps.result:
  Test case for bug#6094
mysql-test/t/ps.test:
  Test case for bug#6094
mysys/hash.c:
  Fix compiler warnings
mysys/my_handler.c:
  Add comments about compiler warnings
mysys/my_thr_init.c:
  Add comments about compiler warnings
ndb/include/mgmapi/mgmapi.h:
  Fix compiler warnings
regex/main.c:
  Fix compiler warnings
sql/item.h:
  Fix compiler warnings
sql/item_func.h:
  Add comments about compiler warnings
sql/spatial.h:
  Add comments about compiler warnings
sql/sql_lex.h:
  Fix compiler warning
sql/sql_list.h:
  Fix compiler warning
sql/sql_parse.cc:
  Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT
  (Bug #6094)
sql/sql_prepare.cc:
  Remove not needed empty line
sql/sql_string.h:
  Fix compiler warnings
strings/ctype-mb.c:
  Fix compiler warnings
2004-10-22 18:44:51 +03:00
unknown
ca8be36f3a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/media/sda1/mysql/mysql-4.1-6050


sql/sql_class.h:
  Auto merged
2004-10-22 15:59:58 +04:00
unknown
4512a46e65 A fix and test case for Bug#6050 "EXECUTE stmt reports ambiguous field
names with ident. tables fr. diff. schemata": revise all uses of
Item_field and make them prepared-statements friendly when necessary.


mysql-test/r/ps.result:
  Test results fixed: the test case for Bug#6050
mysql-test/r/ps_1general.result:
  Test results fixed: in prepared statements we expand '*' to a list
  of fully qualified fields (db.table.column).
mysql-test/t/ps.test:
  A test for Bug#6050 "EXECUTE stmt reports ambiguous fieldnames with 
  ident. tables fr. diff. schemata"
sql/item.cc:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/item.h:
  Revise all Item_field constructors: we need to make sure that no Item_field
  object points to unaccessible memory in prepared statements.
sql/sql_base.cc:
  Item_field use changed to be prepared statements friendly.
sql/sql_class.h:
  New check of Item_arena state.
sql/sql_union.cc:
  Fixing the problem with name resolving in UNION and prepared statements:
  In case of SELECT a, b, c FROM t1 UNION SELECT a, b, c FROM t2 the list of
  selected items is represented as a List<Item_field>, where each 
  Item_field points to a field of temporary table.
  But the temporary table is created anew on each execution of the prepared 
  statement. So on each subsequent execution we should reset Item_field
  items to point to fields from freshly-created temporary table.
sql/table.h:
  Comment TABLE member.
2004-10-22 14:47:35 +04:00
unknown
d2bfd6766f mysqltest.c, mysqltest.result, mysqltest.test:
Added SQLSTATE matching support to test engine
mysqltest.result, mysqltest.test:
  new file


mysql-test/t/mysqltest.test:
  Added SQLSTATE matching support to test engine
mysql-test/r/mysqltest.result:
  Added SQLSTATE matching support to test engine
client/mysqltest.c:
  Added SQLSTATE matching support to test engine
2004-10-22 05:56:27 +02:00
unknown
8537cf2f4b Fix for bug #6116 "SET time_zone := ... requires access to
mysql.time_zone* tables".

We are excluding implicitly used time zone tables from privilege
checking.


mysql-test/r/timezone2.result:
  Added test for bug #6116 "SET time_zone := ... requires access to 
  mysql.time_zone tables"
mysql-test/t/timezone2.test:
  Added test for bug #6116 "SET time_zone := ... requires access to 
  mysql.time_zone tables"
sql/sql_parse.cc:
  check_table_access(): we should avoid privilege checking for implicitly
  used time zone tables.
sql/tztime.cc:
  Indicated dependancy between my_tz_get_table_list() function and
  my_tz_check_n_skip_implicit_tables() function.
sql/tztime.h:
  Added my_tz_check_n_skip_implicit_tables() function which allows easily
  determine whenever we have found beggining of the list of implicitly used
  time zone tables and fast-forward to its end.
2004-10-21 22:18:00 +04:00
unknown
48dc2f0844 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/mysql-4.1
2004-10-21 17:57:48 +02:00
unknown
120afb8ea2 Merge mysql.com:/M41/mysql-4.1 into mysql.com:/M41/push-4.1 2004-10-21 17:47:05 +02:00
unknown
315b7d89eb A fix (bug #6138: MOD operator should not round non-integral argument). 2004-10-21 19:52:55 +05:00
unknown
97ccddddf5 Adapt 'ps_10nestset' to standard test style; correct a typing error in 'ps_11bugs'.
mysql-test/r/ps_10nestset.result:
  Correct the expected protocol according to the test changes.
mysql-test/t/ps_10nestset.test:
  Improve comments;  adapt to standard test style:
  disable warnings around 'drop table', use 't#' table name scheme.
mysql-test/t/ps_11bugs.test:
  Corrected a typing error in the bug number comment.
2004-10-21 16:02:12 +02:00
unknown
655e1a9d8a Bug #5679 utf8_unicode_ci LIKE--trailing % doesn't equal zero characters 2004-10-21 14:48:37 +05:00
unknown
8f82360081 Allow cp932 characters to be stored in a SJIS column 2004-10-21 12:17:59 +05:00
unknown
ffd77c4679 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-10-20 17:31:59 +00:00
unknown
44db341fdb fix so that ndb handler can cope with char(0), mapped to char(1) for now 2004-10-20 17:22:58 +00:00
unknown
10a6020ee0 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


libmysql/libmysql.c:
  Auto merged
2004-10-20 18:58:01 +03:00
unknown
4ba94cc3f9 After merge fixes 2004-10-20 17:28:40 +03:00
unknown
560d7bcdd0 Merge with 4.0
BitKeeper/etc/logging_ok:
  auto-union
Docs/Support/texi2html:
  Auto merged
innobase/trx/trx0rec.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysys/thr_lock.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/sql_acl.cc:
  Keep old code
2004-10-20 16:24:28 +03:00
unknown
ec8779e95a Fix test case for innodb-lock
mysql-test/r/innodb-lock.result:
  Fix test case (old one didn't test things correctly)
mysql-test/t/innodb-lock.test:
  Fix test case (old one didn't test things correctly)
mysys/thr_lock.c:
  More debugging information
sql/mysqld.cc:
  Enable innodb_table_locks as default, as otherwise there is a possibility for deadlocks
sql/sql_base.cc:
  More debug information
2004-10-20 16:04:28 +03:00
unknown
1d3c05901a Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-secfix


sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2004-10-20 17:02:15 +04:00
unknown
b88150c96e Fix for bug #6173 "One can circumvent missing UPDATE privilege if
he has SELECT and INSERT privileges for table with primary key"

Now we set lex->duplicates= DUP_UPDATE right in parser if INSERT has
ON DUPLICATE KEY UPDATE clause, this simplifies insert_precheck()
function (this also fixes a bug) and some other code.


mysql-test/r/grant2.result:
  Added test for bug #6173 "One can circumvent missing UPDATE privilege if
  he has SELECT and INSERT privileges for table with primary key"
mysql-test/t/grant2.test:
  Added test for bug #6173 "One can circumvent missing UPDATE privilege if
  he has SELECT and INSERT privileges for table with primary key"
sql/mysql_priv.h:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause.
sql/sql_parse.cc:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause, so it can determine whenever it is needed to
  require UPDATE_ACL by itself. Also calling of mysql_insert() is
  simplified.
sql/sql_prepare.cc:
  insert_precheck() don't need "update" parameter any longer since
  now we set lex->duplicates to DUP_UPDATE if INSERT has ON DUPLICATE
  KEY UPDATE clause, so it can determine whenever it is needed to
  require UPDATE_ACL by itself. Also calling of mysql_insert() is
  simplified.
sql/sql_yacc.yy:
  It is better to set Lex->duplicates= DUP_UPDATE right in parser if we
  have INSERT with ON DUPLICATE KEY UPDATE clause, rather doing this later.
2004-10-20 16:04:43 +04:00
unknown
ed8ec2cf16 Code cleanups (done during review of new code)
Rename innodb_table_locks_old_behavior -> innodb_table_locks
Set innodb_table_locks to off by default to get same behaviour as in MySQL 4.0.20
(This means that Innodb ignore table locks by default, which makes it easier to combine MyISAM and InnoDB to simulate a transaction)


libmysql/libmysql.c:
  Use ulong instead of unsigned long
  Reuse _dig_vec()
myisam/myisampack.c:
  Simplify code
mysql-test/r/innodb-lock.result:
  new test case
mysql-test/t/innodb-lock.test:
  new test case
sql/ha_innodb.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/mysqld.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
  Set this off by default to get same behaviour as in MySQL 4.0.20
sql/set_var.cc:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
sql/sql_class.h:
  Rename innodb_table_locks_old_behavior -> innodb_table_locks
2004-10-20 11:24:08 +03:00
unknown
f0a6f2b6a5 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb-merge
2004-10-19 15:00:02 +00:00
unknown
012de9d742 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-10-18 13:39:19 +00:00
unknown
1412365a3f Bug #6139 UNION doesn't understand collate in the column of second select 2004-10-18 17:56:25 +05:00
unknown
a8b7ac32d0 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2004-10-18 12:12:02 +00:00
unknown
5267ec8a5a Bug #6040 can't retrieve records with umlaut characters in case insensitive manner 2004-10-18 15:23:24 +05:00
unknown
221d51ebb1 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1
2004-10-16 08:17:50 +03:00
unknown
f125849dd1 New tests for bug#1644 and bug#1676,
test for bug#1180 changed to table naming scheme 't#'.


mysql-test/r/ps_11bugs.result:
  Expected results of new tests for bug#1644 and bug#1676,
  test for bug#1180 changed to table naming scheme 't#'.
mysql-test/t/ps_11bugs.test:
  New tests to check bug#1644 and bug#1676,
  test for bug#1180 changed to table naming scheme 't#'.
2004-10-15 12:56:57 +02:00
unknown
c1a91f4b3e Merge mysql.com:/M41/mysql-4.1 into mysql.com:/M41/push-4.1 2004-10-15 10:34:40 +02:00
unknown
aa43bc07d5 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb
2004-10-15 08:11:45 +02:00
unknown
d942710916 Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
2004-10-15 08:10:08 +02:00
unknown
a55e476913 Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/talle/mysql-4.1


mysql-test/t/ctype_utf8.test:
  Auto merged
2004-10-15 08:24:58 +03:00
unknown
dbe2739292 This patch removes unnecessary lock from the supremum record, takes
X-locks on duplicates also on LOAD DATA...REPLACE clause and
fixes a bug #6086 adding --disable_warnings and --enable_warnings around
the create table clauses in ctype_utf8 tests for InnoDB.


innobase/dict/dict0dict.c:
  Remove static.
innobase/include/dict0dict.h:
  Add prototype for a function dict_scan_to
innobase/row/row0ins.c:
  Add support for a LOAD DATA INFILE 'xxx' REPLACE INTO TABLE x. We should
  take X-locks on both REPLACE and LOAD DATA...REPLACE queries to duplicate
  records.
innobase/row/row0sel.c:
  If innodb_locks_unsafe_for_binlog options is used we do not lock
  gaps. Supremum record is really a dummy record i.e. gap, therefore 
  we do set locks there.
mysql-test/t/ctype_utf8.test:
  Fix bug #6086: Add --disable_warnings and --enable_warnings around the 
  create table where engine=innodb.
2004-10-14 15:36:36 +03:00
unknown
3329f3161b ctype_utf8.test, ctype_utf8.result:
Wrong handler.


mysql-test/r/ctype_utf8.result:
  Wrong handler.
mysql-test/t/ctype_utf8.test:
  Wrong handler.
2004-10-14 16:40:03 +05:00
unknown
ae0acc8472 Bug #6019 SELECT tries to use too short prefix index on utf8 data 2004-10-14 16:36:29 +05:00
unknown
364ebd65f8 There were no tests for bug#1644 and bug#1676, added them now.
mysql-test/r/ps_11bugs.result:
  Expected results of the added tests for bug#1644 and bug#1676.
mysql-test/t/ps_11bugs.test:
  Added tests for bug#1644 and bug#1676,
  also minor comments.
2004-10-14 13:22:25 +02:00
unknown
a5484c0c6f ctype_utf8.test:
Bug#6086 "ctype_utf8" test fails when MySQL does not include InnoDB support


mysql-test/t/ctype_utf8.test:
  Bug#6086 "ctype_utf8" test fails when MySQL does not include InnoDB support
2004-10-14 15:29:07 +05:00
unknown
81914f489e Bug #6043 erratic searching for diacriticals in indexed MyISAM UTF-8 table 2004-10-14 14:14:50 +05:00
unknown
54b00f5453 A fix and test case for Bug#5985 ""prepare stmt from "select rand(?)"
crashes server." The fix makes Item_func_rand prepared-statements
aware plus it fixes the case when RAND is used in prepared
statements and replication is on (as well as several similar issues).
Until now we did not reset THD before every execution of a prepared
statement, so if some execution had set thd->time_zone_used
or thd->rand_used they would not be reset until next mysql_parse.
Some of post-review fixes done.


mysql-test/r/ps.result:
  A test case for Bug#5985: test results fixed.
mysql-test/t/ps.test:
  A test case for Bug#5985 "prepare stmt from "select rand(?)" crashes
  server."
sql/item_func.cc:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/item_func.h:
  Actual fix for Bug#5985: Item_func_rand rewritten to be 
  prepared statements aware.
sql/mysql_priv.h:
  We need a separate call to reset THD state before every execute of
  a prepared statement. Otherwise things like THD->user_var_events
  are never cleaned up and bloat binary log (as the list of events
  grows from execution to execution).
sql/sql_class.cc:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_class.h:
  Statement::end_statement -> THD::end_statement()
  (a leftover from some design change which is not to pushed now, but the
  leftover is to be pushed).
sql/sql_lex.cc:
  Move the part responsible for initializing LEX from mysql_init_query
  to lex_start.
sql/sql_lex.h:
  All lex-related initialization is now in lex_start.
  Move thd->select_number to lex->select_number to be able to use it
  easily in lex_start.
sql/sql_parse.cc:
  Split mysql_init_query into two functions: mysql_reset_thd_for_next_query,
  which is used in PS and conventional execution, and lex_start, used only
  when we want to parse something.
  Fix init_connect to use initialized THD.
sql/sql_prepare.cc:
  Deploy mysql_reset_thd_for_next_query to reset THD state before
  execution of a prepared statement.
  Normally this should have been added to just one place, but
  we have to reset thd before assigning placeholders from variables,
  thus we can't do that in execute_stmt (yuck).
2004-10-14 02:53:59 +04:00
unknown
9b027c04c7 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2004-10-13 10:19:28 +02:00
unknown
92dce374ae Bug#6020, any lock >= write_allow_write is a write lock
mysql-test/r/ndb_lock.result:
  Add testcases for table locks
mysql-test/t/ndb_lock.test:
  Add testcases for table locks
2004-10-13 10:08:18 +02:00
unknown
d007600b9b ps.test, ps.result: a test case for Bug#6042 "constants
propogation works only once (prepared statements)".


mysql-test/r/ps.result:
  Test case for Bug#6042: test results fixed
mysql-test/t/ps.test:
  A test case for Bug#6042 "constants propogation works only once
  (prepared statements).
2004-10-12 21:16:07 +04:00
unknown
4855ff5152 New tests for prepared statements:
- 'ps_10nestset' uses a "nested set" approach for an employee 
  hierarchy, then does arithmetic on the "salary" field;
  (soon) to be extended by inserts / deletes which imply
  mass updates on the "l"/"r" fields showing the set inclusion,
- 'ps_11bugs' will get (some of ?) those bug DB entries which
  refer to prepared statements, but whose number does not appear
  in a test file comment - so it will also be extended.
2004-10-12 16:00:50 +02:00
unknown
27a19225af Fix order by 2004-10-12 07:20:38 +02:00
unknown
a66a4dfb59 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2004-10-11 11:02:24 +02:00
unknown
c5f9a412ce Fix for BUG#5949 "error code 1223 in binlog when using innobackup":
when one connection had done FLUSH TABLES WITH READ LOCK, some updates, and then COMMIT,
it was accepted but my_error() was called and so, while client got no error, error was logged in binlog.
We now don't call my_error() in this case; we assume the connection know what it does.
This problem was specific to 4.0.21. The change is needed to make replication work with existing versions of innobackup.


sql/lock.cc:
  If a connection has done FLUSH TABLES WITH READ LOCK and now is doing COMMIT, don't give error
  (applies only if it's the same connection; others' COMMITs are still blocked).
2004-10-11 11:01:38 +02:00
unknown
9addd5f73d Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb-merge
2004-10-10 14:08:18 +00:00
unknown
1073271b1c Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5382
2004-10-10 16:31:42 +05:00
unknown
da03d0a1f8 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
2004-10-10 11:31:41 +00:00