Commit graph

31608 commits

Author SHA1 Message Date
unknown
d64f605e48 Fixed bug #21231: wrong results for a simple query with a
a non-correlated single-row subquery over information schema.

The function get_all_tables filling all information schema
tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
this the function could evaluate partial conditions related to
some columns. If these conditions contained a subquery over
information schema it led to a wrong evaluation and a wrong 
result set.
This bug was already fixed in 5.1.
This patch follows the way how it was done in 5.1 where
the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
in get_all_tables only for the calls of the function 
open_normal_and_derived_tables and is restored after these
calls.


mysql-test/r/information_schema.result:
  Added a test case for bug #21231.
mysql-test/t/information_schema.test:
  Added a test case for bug #21231.
2006-07-24 19:05:46 -07:00
unknown
c4bfacd777 Bug #16502: mysqlcheck gets confused with views
Make mysqlcheck skip over views when processing all of the tables in a
  database.


client/mysqlcheck.c:
  Use SHOW TABLE STATUS to get table list, and skip over things that don't
  have an engine (like a VIEW).
mysql-test/r/mysqlcheck.result:
  Add new results
mysql-test/t/mysqlcheck.test:
  Add new regression test
2006-07-24 13:31:20 -07:00
unknown
c939a8d7e5 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into  trift2.:/M41/push-4.1
2006-07-24 19:27:01 +02:00
unknown
75220954bf Merge trift2.:/M41/clone-4.1
into  trift2.:/M41/push-4.1


sql/field.cc:
  Auto merged
sql/sql_locale.cc:
  Changes were already present (and even better) == Null-merge == "ul".
2006-07-24 19:18:30 +02:00
unknown
d2f447a9b4 Bug #19265 describe command does not work from mysql prompt
- Add test case


mysql-test/r/mysql.result:
  Update test result
mysql-test/t/mysql.test:
  Add test for mysql using DESC command
2006-07-24 19:01:54 +02:00
unknown
a96669395c Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug20145
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 18:21:15 +02:00
unknown
def55c5219 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Send confusing output to /dev/null


mysql-test/t/mysqlbinlog.test:
  Send confusing error messages to /dev/null so they don't appear in erro log if test case fails
2006-07-24 18:12:57 +02:00
unknown
0227a7b066 Bug#20145 perror segfault when call it with error nr
- Add test case(execute perror)
  - Check if strerror has returned NULL and set msg to "Unknown Error" in that case
  - Thanks to Steven Xie for pointing out how to fix. 


extra/perror.c:
  strerror might return NULL on Solaris 2.8
mysql-test/mysql-test-run.pl:
  Add possibility to execute perror from test case
mysql-test/r/have_perror.require:
  New BitKeeper file ``mysql-test/r/have_perror.require''
mysql-test/r/perror.result:
  New BitKeeper file ``mysql-test/r/perror.result''
mysql-test/t/perror.test:
  New BitKeeper file ``mysql-test/t/perror.test''
2006-07-24 18:05:00 +02:00
unknown
d2ed03936f Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug19745
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 16:36:13 +02:00
unknown
d6d5983074 Merge trift2.:/M41/clone-4.1
into  trift2.:/M50/merge-4.1-to-5.0


VC++Files/libmysqld/libmysqld.dsp:
  Auto merged
VC++Files/libmysqld/libmysqld.vcproj:
  Auto merged
VC++Files/libmysqld/libmysqld_ia64.dsp:
  Auto merged
VC++Files/mysqldemb/mysqldemb.dsp:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
VC++Files/sql/mysqld.vcproj:
  Auto merged
VC++Files/sql/mysqld_ia64.dsp:
  Auto merged
VC++Files/sql/mysqldmax.dsp:
  Auto merged
sql/field.cc:
  Merge a backport == Null-merge == "ul".
sql/field.h:
  Merge a backport == Null-merge == "ul".
sql/sql_locale.cc:
  Changes were already present (and even better) == Null-merge == "ul".
2006-07-24 16:30:31 +02:00
unknown
6baeccc604 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt


client/mysql.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
2006-07-24 16:25:20 +02:00
unknown
4e31c3fe60 Merge trift2.:/M41/push-1-4.1
into  trift2.:/M50/merge-4.1-to-5.0


strings/strtod.c:
  Manual merge: Null merge with header file cleanup ("my_base.h" includes "my_global.h", so we do not need both).
2006-07-24 16:04:40 +02:00
unknown
c98ff21c3a Merge trift2.:/M41/tmp_merge
into  trift2.:/M50/merge-4.1-to-5.0


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_locale.cc:
  Auto merged
sql/item_timefunc.cc:
  Merging by "ul", as asked in the original changeset.
support-files/mysql.spec.sh:
  Manual merge, keeping alphabetic order.
2006-07-24 15:47:57 +02:00
unknown
568b49fb7d Bug#21125 mysqldump: Problem with non-standard table names
- The mysql-test/std_data/bug15328.cnf file was not copied to install or dist dir.


mysql-test/Makefile.am:
  Add std_data/*.cnf files to dist_hook and install-data-local
scripts/make_win_src_distribution.sh:
  Copy *.cnf files as well.
2006-07-24 14:31:37 +02:00
unknown
af3f6282a5 Merge trift2.:/M41/tmp_merge
into  trift2.:/M50/merge-4.1-to-5.0


support-files/mysql.spec.sh:
  Auto merged
configure.in:
  Manual - "use local".
2006-07-24 14:06:17 +02:00
unknown
44a40f1dd4 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug14702
2006-07-24 15:13:21 +04:00
unknown
3037459ad5 BUG#14702: misleading error message when syntax error in
CREATE PROCEDURE

The bug was fixed already.  This changeset adds a test case.


mysql-test/r/sp-error.result:
  Add result for bug#14702: misleading error message when syntax error
  in CREATE PROCEDURE.
mysql-test/t/sp-error.test:
  Add test case for bug#14702: misleading error message when syntax error
  in CREATE PROCEDURE.
2006-07-24 15:10:50 +04:00
unknown
a08a110878 Bug#21215 mysqldump creating incomplete backups without warning
- Add call to 'safe_exit' function when db query fails.


client/mysqldump.c:
  Add a call to 'safe_exit' to remember the error code and exit unless --force was give.n
mysql-test/r/mysqldump.result:
  Add test result
mysql-test/t/mysqldump.test:
  Add test case
2006-07-24 13:10:24 +02: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
6fc7c5d9e0 Don't close connection to mysql before 'safe_exit', that is done in 'safe_exit' if it decides to exit. 2006-07-24 12:48:02 +02:00
unknown
2870c7f91f Remove double printout of mysqldump in error message 2006-07-24 12:43:35 +02:00
unknown
b8f39f0e17 Replace sock -> mysql 2006-07-24 12:00:44 +02:00
unknown
6bd69b2e6a Change tFlag and dFlag into human readable format
tFlag => opt_no_create_info
 dFlag => opt_no_data
2006-07-24 11:56:01 +02:00
unknown
472f614925 Add function verbose_msg
client/mysqldump.c:
  Add function verbose_msg and use it from all places where messages are printed if --verbose are turned on
2006-07-24 11:51:52 +02:00
unknown
af7430645f Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug15690
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 11:07:41 +02:00
unknown
7b8285c956 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 11:06:08 +02:00
unknown
394fe01f7f Merge mysql.com:/Users/kent/mysql/bk/mysql-4.0
into  mysql.com:/Users/kent/mysql/bk/mysql-4.1-new
2006-07-24 10:59:51 +02:00
unknown
4a0b822be2 Bug#10877 mysqldump should use consistent last line
- Add printout in write_footer to tell that mysqldump has completed.
   Ex: -- Dump completed 2006-07-24  8:55:05


client/Makefile.am:
  Build mysqldump with mf_getdate.c
client/mysqldump.c:
  Add printout in write_footer that will print info that mysqldump has completed
2006-07-24 10:56:33 +02:00
unknown
ea123dacfd mwasmnlm, mwccnlm, mwldnlm:
Filter out strange control characters, messes up logs


netware/BUILD/mwasmnlm:
  Filter out strange control characters, messes up logs
netware/BUILD/mwccnlm:
  Filter out strange control characters, messes up logs
netware/BUILD/mwldnlm:
  Filter out strange control characters, messes up logs
2006-07-24 10:55:26 +02:00
unknown
a2df3e6365 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370
2006-07-23 16:26:12 +05:00
unknown
c2c79987fc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370
2006-07-23 15:45:00 +05:00
unknown
2522343924 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b8143
2006-07-23 15:28:50 +05:00
unknown
16878843e0 Fix for bug #8143: A date with value 0 is treated as a NULL value
mysql-test/r/delete.result:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - test result
mysql-test/t/delete.test:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - test case
sql/sql_delete.cc:
  Fix for bug #8143: A date with value 0 is treated as a NULL value
    - during SELECT queries processing we convert 'date[time]_field is null' 
      conditions into 'date[time]_field = 0000-00-00[ 00:00:00]' for not null 
      DATE and DATETIME fields. To be consistent, we have to do the same for DELETE
      queries. So we should call remove_eq_conds() in the mysql_delete() as well.
      Also it may simplify and speed up DELETE queries execution.
2006-07-23 15:25:30 +05:00
unknown
9d5b76eba9 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16327


sql/field.cc:
  Auto merged
mysql-test/r/func_time.result:
  merging
mysql-test/t/func_time.test:
  merging
2006-07-23 14:17:01 +05:00
unknown
8819a677cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b19370


mysql-test/r/date_formats.result:
  Auto merged
2006-07-23 13:43:44 +05:00
unknown
774300afe4 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/5.0.b10966


mysql-test/r/func_group.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
2006-07-23 12:58:26 +05:00
unknown
800b160031 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-22 12:45:45 -07:00
unknown
43df9fd34c Fixed bug #18925: wrong results for queries with
subqueries on information schema that use MIN/MAX aggregation.

Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following executions of
the subquery in the case when an optimization filtering
by some condition is applied.

The fix restores the value of the null_row flag for 
each execution of a subquery on information schema.


mysql-test/r/information_schema.result:
  Added a test case for bug #18925.
mysql-test/t/information_schema.test:
  Added a test case for bug #18925.
sql/sql_show.cc:
  Fixed bug #18925.
  Execution of some correlated subqueries may set the value
  of null_row to 1 for tables used in the subquery.
  If the the subquery is on information schema it causes
  rejection of any row for the following execitions of
  the subquery in the case when an optimization filtering
  by some condition is applied.
  
  The fix restores the value of the null_row flag for 
  each execution of a subquery on information schema.
2006-07-22 12:44:54 -07:00
unknown
8a596b0237 Merge office:mysql/autopush/B20466-5.0-opt
into  macbook.mshome.net:/Users/kgeorge/mysql/work/B20466-5.0-opt


sql/sql_select.cc:
  Auto merged
2006-07-22 15:18:30 +03:00
unknown
6c6c280bbc Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-22 15:18:29 +03:00
unknown
0f5797f576 Post-merge fixes 2006-07-22 16:18:28 +04:00
unknown
c24e91ece7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-22 14:03:42 +03:00
unknown
0950a31683 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-opt2
2006-07-22 15:03:41 +04:00
unknown
cf1c7cb203 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
2006-07-22 09:11:50 +03:00
unknown
da0d9f37c4 Bug #19147: mysqlshow INFORMATION_SCHEMA does not work
When a wildcard database name is given the mysqlshow, but that wildcard
  matches one database *exactly* (it contains the wildcard character), we
  list the contents of that database instead of just listing the database
  name as matching the wildcard. Probably the most common instance of users
  encountering this behavior would be with "mysqlshow information_schema".


client/mysqlshow.c:
  Add special handling for listing a single database that has a name that
  looked like it contained wildcards. In this case, we just go ahead and list
  the contents of the database, since there is a very high probability that is
  what the user really wanted to do. (For example, 'mysqlshow INFORMATION_SCHEMA'
  will show the I_S tables instead of just the I_S database.)
mysql-test/r/mysqlshow.result:
  Add new results
mysql-test/t/mysqlshow.test:
  Add new regression test
2006-07-21 20:29:25 -07:00
unknown
5a3a1c98a4 field.h:
Fixed typo.


sql/field.h:
  Fixed typo.
2006-07-22 05:52:37 +04:00
unknown
b15e62733d mysqlmanager.vcproj:
Place mysqlmanager 'pdb' file in 'client_debug' directory
mysys.vcproj:
  Removed define of __NT__ from 'Debug' target
mysqld.vcproj:
  Always generate 'pdb' and 'map' files


server-tools/instance-manager/mysqlmanager.vcproj:
  Place mysqlmanager 'pdb' file in 'client_debug' directory
VC++Files/mysys/mysys.vcproj:
  Removed define of __NT__ from 'Debug' target
VC++Files/sql/mysqld.vcproj:
  Always generate 'pdb' and 'map' files
2006-07-22 02:00:33 +02:00
unknown
8fc51f7aa6 Merge mysql.com:/home/psergey/mysql-4.1-opt
into  mysql.com:/home/psergey/mysql-5.0-opt2


mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/subselect.test:
  Manual merge
2006-07-22 02:41:29 +04:00
unknown
9d432f0dae Add missing "DROP TABLE" clause 2006-07-22 02:36:17 +04:00
unknown
f171d628c7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/autopush/12185-bug-5.0-opt-mysql


mysql-test/r/create.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
mysql-test/r/union.result:
  SCCS merged
mysql-test/t/union.test:
  SCCS merged
2006-07-22 02:15:36 +04:00