Commit graph

500 commits

Author SHA1 Message Date
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
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
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
942af8b655 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my50-no-strange-literals
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint


tests/mysql_client_test.c:
  Auto merged
2006-08-31 11:31:45 -04:00
unknown
9e4d75d18d Merge zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my41-no-strange-literals
into  zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my50-no-strange-literals


tests/mysql_client_test.c:
  Auto merged
2006-08-31 11:27:55 -04:00
unknown
22da915b62 Bitkeeper's Tk interface uses UTF8 by default, so mixing charsets in a
single file is a bad practice.  


tests/mysql_client_test.c:
  Replace literal characters which don't make sense in UTF8 with ubiquitously-
  understood numbers.
2006-08-31 11:14:04 -04: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
97c0c8106e Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


tests/mysql_client_test.c:
  Auto merged
2006-08-22 08:31:18 +02:00
unknown
3d847396a2 Remove debug printout from mysql_client_test
tests/mysql_client_test.c:
  Remove debug printout
2006-08-22 08:30:33 +02:00
unknown
ad0f34e38e Bug#21757: mysql_client_test fails in testcase when reading master.log file
tests/mysql_client_test.c:
  Replace fopen with my_fopen and specify O_BINARY. Replace fclose with my_fclose.
2006-08-21 20:29:11 -04:00
unknown
7a8f8733e3 Merge bk-internal:/home/bk/mysql-5.0-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


tests/mysql_client_test.c:
  Auto merged
2006-08-21 14:09:38 +02:00
unknown
d36b0cdf49 Print lines from log file to see what's in them 2006-08-21 14:06:59 +02:00
unknown
860c385346 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0


client/mysql.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-08-17 10:53:12 -04:00
unknown
7faa9efe4b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0


tests/mysql_client_test.c:
  Auto merged
2006-08-17 10:49:56 -04:00
unknown
d82c1514e7 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0


mysql-test/r/grant.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-08-17 10:47:23 -04:00
unknown
cabca09fe5 My previous change of replacing the call to sprintf with some memcpy type routines was not correct. This patch reverts that.
mysql_client_test.c:
  reverting my previous change


tests/mysql_client_test.c:
  reverting my previous change
2006-08-14 20:48:37 +02:00
unknown
f78ffbf96c Some small cleanups that will help get mysql_client_test passing on Windows
tests/mysql_client_test.c:
  set sql_mode to '' in a few places
  explicitly select myisam table type for fulltext
  use memcpy instead of strcpy since our src buffer is not zero terminated.
2006-08-10 17:39:01 -05:00
unknown
698bd7c4fa Remove extra whitespace 2006-08-07 19:21:43 +02:00
unknown
d09ba5a874 Add some more code to analyze why the fgets fails. 2006-08-07 17:26:02 +02:00
unknown
703c50e639 Add printouts in test case for bug17667
tests/mysql_client_test.c:
  Add printout describing what master.log is to be opened.
  Add printout about statements that are found in the log.
2006-08-07 14:02:57 +02:00
unknown
966d11ef8d Change the 'sleep' into an explicit FLUSH LOGS command 2006-08-07 11:29:41 +02:00
unknown
a234e13a05 fflush(NULL) before abort so that all pending writes are performed 2006-08-07 10:16:37 +02:00
unknown
89a9125b70 Flush stderr before calling abort() 2006-08-06 23:56:51 +02:00
unknown
5efe5fd820 please don't call methods that should always execute inside assert()
tests/mysql_client_test.c:
  fixed lines that are executing methods that should always execute inside assert()
2006-08-05 18:58:38 -05:00
unknown
46ed9d0b67 mysql_client_test.c:
Moving call that processes select results out of the assert


tests/mysql_client_test.c:
  Moving call that processes select results out of the assert
2006-08-05 23:15:23 +02:00
unknown
f3919e9284 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge


include/mysql.h:
  Auto merged
include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
sql/table.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-02 14:13:01 +04:00
unknown
1d0f873d56 Fix after manual merge.
tests/mysql_client_test.c:
  Fix after manual merge: add test for bug#21206.
2006-07-29 13:50:08 +04:00
unknown
39486004bb Merge mysql.com:/home/hf/work/mysql-4.1.mrg
into  mysql.com:/home/hf/work/mysql-5.0.mrg


libmysqld/lib_sql.cc:
  Auto merged
tests/mysql_client_test.c:
  merging
2006-07-25 13:50:17 +05:00
unknown
36510232aa A fix and a test case for Bug#15752 "Lost connection to MySQL server
when calling a SP from C API"

The bug was caused by lack of checks for misuse in mysql_real_query. 
A stored procedure always returns at least one result, which is the 
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this 
result and ivnoked the next query. In turn, libmysql had no check for 
such scenario and mysql_real_query was simply trying to send that query 
without reading the pending response, thus messing up the communication
protocol.

The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.


client/mysqlbinlog.cc:
  net_safe_read -> cli_safe_read
include/mysql.h:
  Remove a private function from the public header.
include/mysql_com.h:
  Remove a define that is never used.
include/sql_common.h:
  Add a declaration for cli_safe_read - a function that reads one packet
  from the server.
libmysql/libmysql.c:
  net_safe_read -> cli_safe_read
  Return CR_COMMANDS_OUT_OF_SYNC on attempt to execute a statement
  using a connection which has pending result sets.
sql-common/client.c:
  Actual fix for Bug#15752: if the server has pending result sets for
  the client, return CR_COMMANDS_OUT_OF_SYNC on attempt to execute
  another query. Similarly to the behaviour of mysql_use_result(),
  multiple result sets block the connection and must be fetched
  before it can be used for another query.
  This uncovered an error in the protocol: the server doesn't drop
  SERVER_MORE_RESULTS_EXISTS status flag upon an error, so in case of
  a multi-query like SELECT 1; SELECT syntax_error; SELECT 2; 
  the client has no way to know that the server won't ever come to 
  execution of the third query and won't return any result sets for it.
  For now, fix it in cli_safe_read, as a proper fix requires extension
  of the client-server protocol.
sql/protocol.cc:
  Remove a name that is never used.
sql/slave.cc:
  net_safe_read -> cli_safe_read
tests/mysql_client_test.c:
  Make 'query' a local variable to avoid name clash.
  Add a test case for Bug#15752 "Lost connection to MySQL server when
  calling an SP from C API"
2006-07-24 14:56:53 +04:00
unknown
c988ef942f Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.19983


libmysqld/lib_sql.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-07-20 16:03:21 +05:00
unknown
b33085b49a merging 2006-07-18 16:43:39 +05:00
unknown
3ff8200ac1 Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/m50-maint--07C2P


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
tests/mysql_client_test.c:
  manual merge
2006-07-13 11:11:20 -04:00
unknown
019e221ca1 A patch to Bug#17667 didn't take into consideration that the vardir, which contains
the server's binlog file, might be set to a different directory.  This adds a new
"vardir" parameter, which takes the name of the directory as a value, so that the 
test_bug17667() test can find the binlog.  


mysql-test/mysql-test-run.pl:
  Add the "vardir" to the options passed to "mysql_test_client", so we know 
  where to find the binlog file.
tests/mysql_client_test.c:
  Receive a new option, "vardir".
  
  Use the vardir option to find the binlog file in test_bug17667() .
2006-07-10 16:38:03 -04:00
unknown
520cd48539 Merge mysqldev@production:my/mysql-5.0-release
into  rt.int.sifira.dk:/usr/local/mysql/tmp-5.0


include/my_sys.h:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/table.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-07-04 12:08:58 +02:00
unknown
97c2188812 Makefile.am:
Avoid duplicate symbol errors on Netware
mwldnlm, mwccnlm, mwasmnlm:
  Filter garbage characters from output


netware/BUILD/mwasmnlm:
  Filter garbage characters from output
netware/BUILD/mwccnlm:
  Filter garbage characters from output
netware/BUILD/mwldnlm:
  Filter garbage characters from output
tests/Makefile.am:
  Avoid duplicate symbol errors on Netware
2006-07-03 10:56:19 +02:00
unknown
3e085bd882 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-07-03 13:19:18 +05:00
unknown
9606675ba2 Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0


libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/key.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Manual merge
  (Now we have same code as in 4.1 and 5.1)
sql/ha_ndbcluster.cc:
  Manual merge
  Change %ll -> llstr()
tests/mysql_client_test.c:
  manual merge
2006-06-30 19:15:18 +03:00
unknown
8615559038 bug #20152: mysql_stmt_execute() overwrites parameter buffers
When using a parameter bind MYSQL_TYPE_DATE in a prepared statement,
the time part of the MYSQL_TIME buffer was written to zero in
mysql_stmt_execute(). The param_store_date() function in libmysql.c
worked directly on the provided buffer.
Changed to use a copy of the buffer.


libmysql/libmysql.c:
  fix for bug #20152
tests/mysql_client_test.c:
  added test for bug#20152
2006-06-30 12:52:05 +04:00
unknown
a7f9f7ae74 Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
After view onening real view db name and table name are placed
into table_list->view_db & table_list->view_name.
Item_field class does not handle these names properly during 
intialization of Send_field.
The fix is to use new class 'Item_ident_for_show' 
which sets correct view db name and table name for Send_field.


sql/item.cc:
  Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
  new Item_ident_for_show class which correctly sets view db and table names
  for Send_field.
sql/item.h:
  Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
  new Item_ident_for_show class which correctly sets view db and table names
  for Send_field.
sql/sql_show.cc:
  Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
  new Item_ident_for_show is used for views
tests/mysql_client_test.c:
  Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
  test case
2006-06-29 16:52:46 +05:00
unknown
ea7aa19396 bug #19983 (mysql_client_test_embedded fails)
libmysqld/lib_sql.cc:
  field length counting fixed
tests/mysql_client_test.c:
  this test is not for embedded server as it tests kill command
2006-06-02 22:33:22 +05:00
unknown
4784833f09 Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0


sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-05-26 18:38:34 +02:00
unknown
6355f74e4d Merge mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.22-release


scripts/mysqld_multi.sh:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
extra/comp_err.c:
  merged
2006-05-24 14:22:36 +02:00
unknown
80e7938736 Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-4.1.20-release


tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
2006-05-24 14:12:19 +02:00
unknown
e1227d2bd1 Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release


tests/mysql_client_test.c:
  Auto merged
configure.in:
  merged
sql/sql_lex.cc:
  merged
2006-05-24 12:19:39 +02:00
unknown
6a60accef2 don't let bugfix for bug#8303 break the bugfix for bug#8378
revert the fix for bug#8303
correct the test for bug#8378


mysql-test/r/ctype_sjis.result:
  updated
mysql-test/t/ctype_sjis.test:
  updated
sql/sql_lex.cc:
  revert the fix for bug#8303
tests/mysql_client_test.c:
  correct the test for bug#8378
2006-05-24 00:55:53 +02:00
unknown
33417297c5 Fix a bunch of non-Linux compile failures.
VC++Files/mysql.sln:
  mysql_client_test depends on mysys.
VC++Files/mysys/mysys.vcproj:
  Add new file missing in previous push.
mysys/my_memmem.c:
  Fix illegal pointer arithmetics on void *.
tests/Makefile.am:
  -L must go before -l
tests/mysql_client_test.c:
  No declarations after statement in C code.
2006-05-02 09:19:54 +02:00
unknown
3010890e58 SECURITY FIX
Bug#17667: An attacker has the opportunity to bypass query logging.

This adds a new, local-only printf format specifier to our *printf functions
that allows us to print known-size buffers that must not be interpreted as 
NUL-terminated "strings."

It uses this format-specifier to print to the log, thus fixing this 
problem.


include/my_sys.h:
  Add prototype for my_memmem() .
mysys/Makefile.am:
  Add reference to new file, my_memmem.c
mysys/mf_iocache2.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
  
  Also, simplify the code a bit.
  
  TODO:  This code should be unified with the strings/my_vnsprintf.c code in 
  the future.
sql/sql_parse.cc:
  The query is not a C-string, but is a sized buffer, containing any character 
  at all, which may include NUL characters.
strings/my_vsnprintf.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
tests/Makefile.am:
  We may need some of our local functions.
tests/mysql_client_test.c:
  Add a "%.1234b" and "%.*b" percent-code.  It takes a width, just like "%s", 
  but unlike the string-indicator, it requires the width and doesn't stop printing
  at NUL characters.
mysql-test/t/mysql_client_test.opt:
  New BitKeeper file ``mysql-test/t/mysql_client_test.opt''
  
  Add '--log' server parameter.
mysys/my_memmem.c:
  New BitKeeper file ``mysys/my_memmem.c''
  
  Implement memmem, a black-box work-alike of the GNU memmem(), which functions
  like strstr() but for arbitrary blocks of memory.
2006-05-01 22:10:50 -04:00
unknown
7369780845 Fix incorrect merge: put '/*' comment start back. 2006-03-30 22:35:50 +04:00
unknown
e0708e2c11 Manual merge
myisam/mi_search.c:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
2006-03-30 17:14:55 +04:00
unknown
4c0111460b Cleanup during review of new pushed code
sql/ha_heap.cc:
  Indentation fixes
strings/ctype-ucs2.c:
  Simplify code
tests/mysql_client_test.c:
  Remove compiler warnings
2006-03-30 03:11:37 +03:00