Commit graph

15136 commits

Author SHA1 Message Date
unknown
ca48feceee Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  example.com:/work/mysql-5.0-runtime


mysql-test/t/sp.test:
  Auto merged
sql/sp.cc:
  Auto merged
mysql-test/r/sp.result:
  manual merge
2006-09-27 22:25:23 +02:00
unknown
fcb8687ad9 Fix for bug#21311: Possible stack overrun if SP has non-latin1 name
There was possible stack overrun in an edge case which handles invalid body of
a SP in mysql.proc . That should be case when mysql.proc has been changed
manually. Though, due to bug 21513, it can be exploited without having access
to mysql.proc only being able to create a stored routine.


mysql-test/r/sp.result:
  update result
mysql-test/t/sp.test:
  add a test case for the bug
sql/sp.cc:
  Fix stack overrun. This happen mostly when mysql.proc is damaged, though
  it's possible due to another bug which creates invalid SP body in mysql.proc
  (leading quote from a label being cut) to create stack overrun even without
  having direct access to mysql.proc
2006-09-27 21:23:17 +02:00
unknown
afedaa1089 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21414


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-09-27 11:46:29 +04:00
unknown
d4933af87e BUG#21414: SP: Procedure undroppable, to some extent
The problem was that if after FLUSH TABLES WITH READ LOCK the user
issued DROP/ALTER PROCEDURE/FUNCTION the operation would fail (as
expected), but after UNLOCK TABLE any attempt to execute the same
operation would lead to the error 1305 "PROCEDURE/FUNCTION does not
exist", and an attempt to execute any stored function will also fail.

This happened because under FLUSH TABLES WITH READ LOCK we couldn't open
and lock mysql.proc table for update, and this fact was erroneously
remembered by setting mysql_proc_table_exists to false, so subsequent
statements believed that mysql.proc doesn't exist, and thus that there
are no functions and procedures in the database.

As a solution, we remove mysql_proc_table_exists flag completely.  The
reason is that this optimization didn't work most of the time anyway.
Even if open of mysql.proc failed for some reason when we were trying to
call a function or a procedure, we were setting mysql_proc_table_exists
back to true to force table reopen for the sake of producing the same
error message (the open can fail for number of reasons).  The solution
could have been to remember the reason why open failed, but that's a lot
of code for optimization of a rare case.  Hence we simply remove this
optimization.


mysql-test/r/sp.result:
  Add result for bug#21414: SP: Procedure undroppable, to some extent.
mysql-test/t/sp.test:
  Remove no longer relevant comment.
  Add test case for bug#21414: SP: Procedure undroppable, to some extent.
sql/mysql_priv.h:
  Remove declaration of mysql_proc_table_exists.
sql/sp.cc:
  Remove references to mysql_proc_table_exists.
sql/sql_acl.cc:
  Remove reference to mysql_proc_table_exists.
2006-09-12 14:56:25 +04:00
unknown
4ef211eee0 after merge fix
sql/mysql_priv.h:
  after merge fix
  added charset parameter to check_string_length() function
sql/slave.h:
  after merge fix
  USERNAME_LENGTH const is changed to USERNAME_BYTE_LENGTH
sql/sql_parse.cc:
  after merge fix
  added charset parameter to check_string_length() function
sql/sql_yacc.yy:
  after merge fix
  added charset parameter to check_string_length() function
2006-09-08 16:16:39 +05:00
unknown
dc6243e588 after merge fix
include/mysql_com.h:
  USERNAME_LENGTH is changed to USERNAME_BYTE_LENGTH
mysql-test/r/ctype_utf8.result:
  result fix
mysql-test/t/ctype_utf8.test:
  test fix
sql/sp.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sp_head.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sql_acl.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
sql/sql_class.h:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
sql/sql_parse.cc:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  Function check_string_length() is fixed, now it check string lenght in symbols
sql/sql_repl.h:
  NAME_LEN constant is changed to NAME_BYTE_LEN for database name buffer
  USERNAME_LENGTH constant is changed to USERNAME_BYTE_LENGTH for user name buffer
2006-09-07 18:09:49 +05:00
unknown
146049d2e4 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-merge
into  mysql.com:/home/gluh/MySQL/Merge/5.0


include/mysql_com.h:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/ctype_utf8.result:
  manual merge
sql/sql_acl.cc:
  manual merge
2006-09-07 15:17:46 +05:00
unknown
979d9c8f80 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-09-06 14:28:53 -04:00
unknown
8946a1e71c Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-09-06 02:14:50 +02:00
unknown
a0b7b2426f Fix for BUG#11151 "LOAD DATA INFILE commits transaction in 5.0".
In 5.0 we made LOAD DATA INFILE autocommit in all engines, while
only NDB wanted that. Users and trainers complained that it affected
InnoDB and was a change compared to 4.1 where only NDB autocommitted.
To revert to the behaviour of 4.1, we move the autocommit logic out of mysql_load() into
ha_ndbcluster::external_lock().
The result is that LOAD DATA INFILE commits all uncommitted changes
of NDB if this is an NDB table, its own changes if this is an NDB
table, but does not affect other engines.
Note: even though there is no "commit the full transaction at end"
anymore, LOAD DATA INFILE stays disabled in routines (re-entrency
problems per a comment of Pem).
Note: ha_ndbcluster::has_transactions() does not give reliable results
because it says "yes" even if transactions are disabled in this engine...


sql/ha_ndbcluster.cc:
  NDB wants to do autocommit if this is LOAD DATA INFILE.
  For this to not affect all other engines, we move the logic
  inside ha_ndbcluster.
sql/sql_load.cc:
  This ha_enable_transaction() in mysql_load() forced an autocommit
  in all engines, while only NDB wants to do that.
  So we move the logic inside ha_ndbcluster.cc.
mysql-test/include/loaddata_autocom.inc:
  test for engines to see if they autocommit or not in LOAD DATA INFILE
mysql-test/r/loaddata_autocom_innodb.result:
  result for InnoDB (no autocommit)
mysql-test/r/loaddata_autocom_ndb.result:
  result for NDB (autocommit)
mysql-test/r/rpl_ndb_innodb_trans.result:
  result for InnoDB+NDB transactions. Observe that when ROLLBACK
  cannot rollback the LOAD DATA INFILE in NDB it issues warning 1196
  as appropriate.
mysql-test/t/loaddata_autocom_innodb.test:
  test that InnoDB does not autocommit in LOAD DATA INFILE.
mysql-test/t/loaddata_autocom_ndb.test:
  test that NDB does autocommit in LOAD DATA INFIL
mysql-test/t/rpl_ndb_innodb_trans-slave.opt:
  need to tell the slave to use innodb
mysql-test/t/rpl_ndb_innodb_trans.test:
  test of transactions mixing NDB and InnoDB. To see if ROLLBACK
  rolls back in both engines, with the exception of LOAD DATA INFILE
  which does not roll back NDB: we see that a LOAD DATA INFILE in NDB
  commits all what has been done in NDB so far, commits its changes,
  but does not commit in other engines.
2006-09-05 16:52:05 +02:00
unknown
6f843c13a4 Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb


sql/log.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2006-09-04 14:34:42 +02:00
unknown
14bebaa2dc Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work


sql/log.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_repl.cc:
  merge
2006-09-04 13:46:56 +02:00
unknown
d2d605e4ea bug#21965 - replication
fix deadlock if master switches log file in parallell with "show master logs"
  


sql/log.cc:
  add raw_get_current_log which dont take log mutex
sql/sql_class.h:
  add raw_get_current_log which dont take log mutex
sql/sql_repl.cc:
  Fix lock order i.e first log_lock then index_lock
2006-09-04 13:43:34 +02:00
unknown
eb0cc3bf87 Merge dl145s:/data/tkatchaounov/5.0-bug-21787
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sql_select.cc:
  Auto merged
2006-09-04 11:45:43 +02:00
unknown
4cd43a1a46 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-09-04 11:42:16 +02:00
unknown
259689f87f Merge bk-internal:/home/bk/mysql-5.0-opt
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-09-04 11:39:58 +02:00
unknown
2ed26cd7a8 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  maint1.mysql.com:/data/localhome/tnurnberg/my50-21913


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
2006-09-04 07:45:49 +02:00
unknown
8ce43f8d23 Merge salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913
into  salvation.intern.azundris.com:/home/tnurnberg/21913/my50-21913

21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.

Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server.  Fixed.

(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)


mysql-test/r/func_time.result:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Prove DATE_FORMAT() no longer crashes the server when character_set_results is
  NULL (which is a legal value and means, "no conversion").
mysql-test/t/func_time.test:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Prove DATE_FORMAT() no longer crashes the server when character_set_results is
  NULL (which is a legal value and means, "no conversion").
sql/sql_string.cc:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
  because it is magic for, "no conversion."
2006-09-04 07:01:15 +02:00
unknown
617189958b Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server.  Fixed.

(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)


mysql-test/r/func_time.result:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Prove DATE_FORMAT() no longer crashes the server when character_set_results is
  NULL (which is a legal value and means, "no conversion").
mysql-test/t/func_time.test:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Prove DATE_FORMAT() no longer crashes the server when character_set_results is
  NULL (which is a legal value and means, "no conversion").
sql/sql_string.cc:
  Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
  
  Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
  because it is magic for, "no conversion."
2006-09-04 06:16:34 +02:00
unknown
50456f81c4 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-cmake
2006-09-02 11:03:16 +02:00
unknown
9c9a27d91a Merge bk-internal:/home/bk/mysql-5.0
into  maint2.mysql.com:/data/localhome/tsmith/bk/50
2006-09-02 10:59:53 +02:00
unknown
73ca6fc5ea Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-cmake
2006-09-02 08:03:32 +02:00
unknown
5d3e6c2758 Fixes for crashes and test failures
scripts/make_win_bin_dist:
  BitKeeper file /home/georg/work/mysql/prod/mysql-5.0-win/scripts/make_win_bin_dist
client/mysqlbinlog.cc:
  Fix for cmake build: Cmake doesn't use the VC++ files
extra/comp_err.c:
  fixed windows crash (debug): We can't call DBUG_RETURN after my_end.
include/my_dbug.h:
  added missing empty define for DBUG_LEAVE to prevent precompiler errors when
  compiling in non_debug mode
mysql-test/mysql-test-run.pl:
  Added support for new cmake release and debug paths.
mysql-test/t/system_mysql_db_fix.test:
  This test requires unix shell script mysql_fix_previleges_tables -> skip under windows
mysys/my_seek.c:
  Fix for windows debug crash. However this solution is bad: we should never
  call lseek with an invalid file pointer.
sql/ha_archive.cc:
  Fixed windows crash: We need dup in gzdopen to keep the filehandle open,
  otherwise subsequent calls to mysql_close will fail/crash.
2006-09-01 14:34:37 +02:00
unknown
495edb59bd Merge timka@10.100.64.80:/home/timka/mysql/src/4.1-bug-21787
into  dl145s.mysql.com:/data/tkatchaounov/5.0-bug-21787


mysql-test/r/limit.result:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
sql/sql_select.cc:
  Adjust the fix for BUG#21787 for 5.0
2006-09-01 14:29:27 +02:00
unknown
b017caefbd Fix for BUG#21787: COUNT(*) + ORDER BY + LIMIT returns wrong result
The problem was due to a prior fix for BUG 9676, which limited
the rows stored in a temporary table to the LIMIT clause. This
optimization is not applicable to non-group queries with aggregate
functions. The fix disables the optimization in this case.


mysql-test/r/limit.result:
  Test case for BUG#21787
mysql-test/t/limit.test:
  Test case for BUG#21787
sql/sql_select.cc:
  If there is an aggregate function in a non-group query,
  materialize all rows in the temporary table no matter if
  there is a LIMIT clause. This is necessary, since the
  aggregate functions must be computed over all result rows,
  not just the first LIMIT rows.
2006-09-01 15:07:04 +03:00
unknown
efa8e33075 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug21477-look-64bit
2006-09-01 14:14:50 +04:00
unknown
dd6dc7adea BUG#21477 "memory overruns for certain kinds of subqueries":
make st_select_lex::setup_ref_array() take into account that 
Item_sum-descendant objects located within descendant SELECTs
may be added into ref_pointer_array.


sql/item_sum.cc:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
  that exist within this SELECT.
sql/sql_lex.h:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Add SELECT_LEX::n_sum_items and SELECT_LEXT::n_child_sum_items.
sql/sql_yacc.yy:
  BUG#21477 "memory overruns for certain kinds of subqueries":
  Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
  that exist within this SELECT.
2006-09-01 13:23:43 +04:00
unknown
cce4cc25a9 make dist changes for Cmake build
libmysql/mytest.c:
  Rename: BitKeeper/deleted/.del-mytest.c -> libmysql/mytest.c
sql/message.mc:
  BitKeeper file /home/georg/work/mysql/prod/mysql-5.0-win/sql/message.mc
2006-09-01 10:32:12 +02:00
unknown
2c4a003e9f Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-09-01 10:20:35 +02:00
unknown
5bd9bf5572 Merge maint2.mysql.com:/data/localhome/tsmith/bk/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/50


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
vio/viosocket.c:
  Auto merged
client/mysql.cc:
  Manual merge.
mysql-test/t/ctype_recoding.test:
  Manual merge.
sql/sql_lex.h:
  SCCS merged
sql/sql_table.cc:
  Manual merge.
mysql-test/r/ctype_recoding.result:
  Manual merge
2006-09-01 08:53:56 +02:00
unknown
fc5ee96866 Merge maint2.mysql.com:/data/localhome/tsmith/bk/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/50


mysql-test/r/heap_btree.result:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/t/heap_btree.test:
  Manual merge.
2006-09-01 03:44:03 +02:00
unknown
8f4477281e Additional files for cmake support
CMakeLists.txt:
  New BitKeeper file ``CMakeLists.txt''
bdb/CMakeLists.txt:
  New BitKeeper file ``bdb/CMakeLists.txt''
client/CMakeLists.txt:
  New BitKeeper file ``client/CMakeLists.txt''
dbug/CMakeLists.txt:
  New BitKeeper file ``dbug/CMakeLists.txt''
extra/CMakeLists.txt:
  New BitKeeper file ``extra/CMakeLists.txt''
extra/yassl/CMakeLists.txt:
  New BitKeeper file ``extra/yassl/CMakeLists.txt''
extra/yassl/taocrypt/CMakeLists.txt:
  New BitKeeper file ``extra/yassl/taocrypt/CMakeLists.txt''
heap/CMakeLists.txt:
  New BitKeeper file ``heap/CMakeLists.txt''
innobase/CMakeLists.txt:
  New BitKeeper file ``innobase/CMakeLists.txt''
libmysql/CMakeLists.txt:
  New BitKeeper file ``libmysql/CMakeLists.txt''
myisam/CMakeLists.txt:
  New BitKeeper file ``myisam/CMakeLists.txt''
myisammrg/CMakeLists.txt:
  New BitKeeper file ``myisammrg/CMakeLists.txt''
mysys/CMakeLists.txt:
  New BitKeeper file ``mysys/CMakeLists.txt''
regex/CMakeLists.txt:
  New BitKeeper file ``regex/CMakeLists.txt''
server-tools/CMakeLists.txt:
  New BitKeeper file ``server-tools/CMakeLists.txt''
server-tools/instance-manager/CMakeLists.txt:
  New BitKeeper file ``server-tools/instance-manager/CMakeLists.txt''
sql/CMakeLists.txt:
  New BitKeeper file ``sql/CMakeLists.txt''
sql/examples/CMakeLists.txt:
  New BitKeeper file ``sql/examples/CMakeLists.txt''
strings/CMakeLists.txt:
  New BitKeeper file ``strings/CMakeLists.txt''
tests/CMakeLists.txt:
  New BitKeeper file ``tests/CMakeLists.txt''
vio/CMakeLists.txt:
  New BitKeeper file ``vio/CMakeLists.txt''
win/Makefile.am:
  New BitKeeper file ``win/Makefile.am''
win/README:
  New BitKeeper file ``win/README''
win/build-vs71.bat:
  New BitKeeper file ``win/build-vs71.bat''
win/build-vs8.bat:
  New BitKeeper file ``win/build-vs8.bat''
win/build-vs8_x64.bat:
  New BitKeeper file ``win/build-vs8_x64.bat''
win/configure.js:
  New BitKeeper file ``win/configure.js''
zlib/CMakeLists.txt:
  New BitKeeper file ``zlib/CMakeLists.txt''
2006-08-31 19:52:42 +02:00
unknown
a1d03bd632 Merge rurik.mysql.com:/home/igor/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug16249
2006-08-31 08:58:26 -07:00
unknown
c4c36e17ac Fixed bug #16249: different results for a range with an without index
when a range condition use an invalid DATETIME constant.
Now we do not use invalid DATETIME constants to form end keys for
range intervals: range analysis just ignores predicates with such
constants.  


mysql-test/r/query_cache.result:
  Adjusted result warnings when adding a fix for bug #16249.
mysql-test/r/range.result:
  Added a test case for bug #16249.
mysql-test/t/range.test:
  Added a test case for bug #16249.
2006-08-31 07:27:34 -07:00
unknown
085446b8c8 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


configure.in:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
sql-common/client.c:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-08-31 11:57:36 +02:00
unknown
5373a7ec0a Merge maint2.mysql.com:/data/localhome/tsmith/bk/g50
into  maint2.mysql.com:/data/localhome/tsmith/bk/50


sql-common/client.c:
  Auto merged
sql/item_func.h:
  Auto merged
BUILD/check-cpu:
  Manual merge
2006-08-31 00:01:43 +02:00
unknown
3fb2ee3571 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897


sql/mysqld.cc:
  Auto merged
2006-08-31 00:14:19 +04:00
unknown
ffa01d4431 Merge neptunus.(none):/home/msvensson/mysql/bug21813/my50-bug21813
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


tests/mysql_client_test.c:
  SCCS merged
2006-08-30 17:21:22 +02:00
unknown
d4075f6659 Bug#21813 An attacker has the opportunity to bypass query logging, part2
- Use the "%.*b" format when printing prepared and exeuted prepared statements to the log.
 - Add test case to check that also prepared statements end up in the query log
Bug#14346 Prepared statements corrupting general log/server memory
 - Use "stmt->query" when logging the newly prepared query instead of "packet"


sql/sql_prepare.cc:
  mysql_stmt_prepare
   - Use "%.*b" format when printing to log
   - Print the query from stmt instead of "packet", packet points at the net in/out buffer and has most likely been overwritten
     when  result for prepare was written to client.
  mysql_stmt_execute 
   - Use "%.*b" format when printing to log
   - Print the query from thd as the expanded query has been specifially set to be valid also after restore from backup statement
tests/mysql_client_test.c:
  Add tests for bug#21813 to already existing test for bug#17667. Add functionality for also executing prepared statements and making sure they end up in the log as well.
2006-08-30 17:11:00 +02:00
unknown
ddb9f8668f Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte


include/mysql_com.h:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN
mysql-test/r/ctype_utf8.result:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
mysql-test/t/ctype_utf8.test:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  test case
sql-common/client.c:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/sql_acl.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that user name is not longer than USERNAME_LENGTH symbols
sql/sql_parse.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  increased buffers for user name & db
sql/table.cc:
  Bug#20393 User name truncation in mysql client
  Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
  check that db name is not longer than NAME_LEN symbols
2006-08-30 15:56:17 +05:00
unknown
72341d49ed Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2006-08-30 08:24:45 +02:00
unknown
3e0fcd915f Remove the fix for Bug#10668 "CREATE USER does not enforce username
length limit", it's superseded by the fix for Bug#16899 "Possible buffer
overflow in handling of DEFINER-clause". Update test results.


mysql-test/r/grant.result:
  A post-merge fix.
mysql-test/t/grant.test:
  A new error is returned, use the default database after drop database.
sql/sql_acl.cc:
  Remove an unneeded check.
2006-08-30 01:48:15 +04:00
unknown
8ea5f31a46 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
mysql-test/r/grant.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-08-30 00:45:33 +04:00
unknown
4355ea5a38 A fix for Bug#14897 "ResultSet.getString("table.column") sometimes
doesn't find the column"

When a user was using 4.1 tables with VARCHAR column and 5.0 server
and a query that used a temporary table to resolve itself, the
table metadata for the varchar column sent to client was incorrect:
MYSQL_FIELD::table member was empty.

The bug was caused by implicit "upgrade" from old VARCHAR to new
VARCHAR hard-coded in Field::new_field, which did not preserve
the information about the original table. Thus, the field metadata
of the "upgraded" field pointed to an auxiliary temporary table
created for query execution.

The fix is to copy the pointer to the original table to the new field.


mysql-test/r/type_varchar.result:
  Update test results (Bug#14897)
mysql-test/t/type_varchar.test:
  Add a test case for Bug#14897 "ResultSet.getString("table.column") 
  sometimes doesn't find the column"
sql/field.cc:
  Preserve the original table name when converting fields from 
  old VARCHAR to new VARCHAR.
mysql-test/std_data/14897.frm:
  New BitKeeper file ``mysql-test/std_data/14897.frm''
2006-08-30 00:38:58 +04:00
unknown
3f4964394c Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-08-29 21:15:49 +02:00
unknown
a10a5cb663 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  polly.local:/home/kaa/src/maint/m50-maint--07OGt
2006-08-29 19:57:52 +04:00
unknown
b2d1f7a444 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591


mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-08-29 14:37:52 +04:00
unknown
7a5a2544bf BUG#17591: Updatable view not possible with trigger or stored function
When a view was used inside a trigger or a function, lock type for
tables used in a view was always set to READ (thus making the view
non-updatable), even if we were trying to update the view.

The solution is to set lock type properly.


mysql-test/r/view.result:
  Add result for bug#17591: Updatable view not possible with trigger
  or stored function.
mysql-test/t/view.test:
  Add test case for bug#17591: Updatable view not possible with trigger
  or stored function.
sql/sql_view.cc:
  Move the code that sets requested lock type before the point where
  we exit from mysql_make_view() when we process a placeholder for
  prelocked table.
2006-08-29 14:32:59 +04:00
unknown
85683afd62 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-08-28 17:56:44 +02:00
unknown
01ec88dcd8 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data/tkatchaounov/autopush/5.0-bug-21456


sql/sql_select.cc:
  Auto merged
2006-08-28 16:08:48 +02:00