Commit graph

899 commits

Author SHA1 Message Date
kaa@polly.(none)
768b251a8c Merge polly.(none):/home/kaa/src/opt/bug32221/my51-bug31445
into  polly.(none):/home/kaa/src/opt/mysql-5.1-opt
2007-11-22 14:56:01 +03:00
kaa@polly.(none)
dd75ee18d4 Merge polly.(none):/home/kaa/src/opt/bug32221/my50-bug31445
into  polly.(none):/home/kaa/src/opt/bug32221/my51-bug31445
2007-11-22 14:39:07 +03:00
kaa@polly.(none)
82c4059fc9 Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and
crashes.

MySQL distributions contain a number of programs that are used only by
the MySQL test suite internally, i.e. they are not indended to be
invoked directly by a user. As a result, such programs are not
documented, do not have any built-in help or proper error reporting,
which may confuse users.

This patch fixes the problem with the following changes:
- mytest, libmysqltest and all references to them were removed from the
distribution since they are not used anymore
- bug25714 now displays an error message when run with incorrect
arguments or with the --help option
- mysql_client_test now does not call abort() in case of errors,
instead it does a clean exit() with a proper error status.
2007-11-19 18:59:25 +03:00
kostja@bodhi.(none)
fdcf20d733 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime-inc
2007-10-31 17:30:46 +03:00
kostja@bodhi.(none)
96f8d086f8 Cleanup: use helper functions to set an error in MYSQL or MYSQL_STMT.
No functionality added or changed.
This is a pre-requisite for the fix for Bug#12713 Error in a stored 
function called from a SELECT doesn't cause ROLLBACK of statem

Address post-review comments.
2007-10-31 17:16:53 +03:00
davi@endora.local
53a048662a Merge endora.local:/Users/davi/mysql/mysql-5.0-runtime
into  endora.local:/Users/davi/mysql/bugs/31669-5.1
2007-10-31 02:04:04 -02:00
davi@moksha.com.br
26f03b0bc6 Merge moksha.local:/Users/davi/mysql/bugs/31669-5.0
into  moksha.local:/Users/davi/mysql/mysql-5.0-runtime
2007-10-30 09:41:24 -03:00
gluh@eagle.(none)
17acda6ca8 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-23 19:08:21 +05:00
gluh@eagle.(none)
237383f0fe Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-23 18:51:43 +05:00
davi@moksha.local/moksha.com.br
dac55f09f0 Bug#31669 Buffer overflow in mysql_change_user()
The problem is that when copying the supplied username and
database, no bounds checking is performed on the fixed-length
buffer. A sufficiently large (> 512) user string can easily
cause stack corruption. Since this API can be used from PHP
and other programs, this is a serious problem.

The solution is to increase the buffer size to the accepted
size in similar functions and perform bounds checking when
copying the username and database.
2007-10-23 09:05:39 -03:00
malff@lambda.hsd1.co.comcast.net.
2d6fbbda59 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge
2007-10-18 16:57:51 -06:00
tsmith@ramayana.hindu.god
9727b6dcac Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-10-17 11:23:04 -06:00
tsmith@ramayana.hindu.god
3d203e55e6 Fix syntax error build problem on Windows (variable was defined
in middle of block)
2007-10-17 11:22:41 -06:00
msvensson@pilot.mysql.com
a152ff1672 Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-new-maint
2007-10-15 10:59:01 +02:00
msvensson@pilot.mysql.com
cecc37d8b4 Merge pilot.mysql.com:/data/msvensson/mysql/bug11589/my50-test_latest
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-maint
2007-10-15 09:22:11 +02:00
tsmith@ramayana.hindu.god
06c6fce750 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-10-10 14:15:09 -06:00
gluh@eagle.(none)
27762854ef Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-10 14:33:46 +05:00
gluh@eagle.(none)
20ec6605d3 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-10 14:31:19 +05:00
kostja@bodhi.(none)
53b0324824 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-10-08 02:05:10 +04:00
anozdrin/alik@station.
7f554deb95 BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.

Use 2 bytes for character set number.
2007-10-01 15:41:18 +04:00
anozdrin/alik@station.
95e01d4453 Fix compile warnings. 2007-09-29 23:31:08 +04:00
anozdrin/alik@station.
8051b7568d Patch for BUG#30472: libmysql doesn't reset charset,
insert_id after succ. mysql_change_user() call.

See also WL 4066.
  
This bug reveals two problems:
  - the problem on the client side which was described originally;
  - the problem in protocol / the server side: connection context
    on client and server should be like after mysql_real_connect()
    and be consistent. The server however just resets character
    set variables to the global defaults.

The fix seems to be as follows:
  - extend the protocol so that the client be able to send
    character set information in COM_CHANGE_USER command;
  - change the server so that it understands client character set
    in the command;
  - change the client:
    - reset character set to the default value (which has been
      read from the configuration);
    - send character set in COM_CHANGE_USER command.
2007-09-28 23:30:54 +04:00
tsmith@ramayana.hindu.god
1be91eac96 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-09-28 10:57:45 -06:00
tsmith@ramayana.hindu.god
37cbd6f7b4 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-09-28 10:55:28 -06:00
tsmith@ramayana.hindu.god
5a1284ccb2 Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-09-28 10:54:49 -06:00
msvensson@pilot.(none)
2a1e556081 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-09-27 08:49:23 +02:00
msvensson@pilot.(none)
e21bb2640a Move DBUG_ENTER to begining of function to avoid build failure with debug on windows 2007-09-27 08:48:39 +02:00
kent@kent-amd64.(none)
c7c8f41894 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  mysql.com:/home/kent/bk/make-dist-stable/mysql-5.1-build
2007-09-26 18:49:09 +02:00
kent@mysql.com/kent-amd64.(none)
1b53e4a547 Makefile.am:
Always include all sub directories in "make dist"
  Removed incorrect comment
configure.in:
  Unconditionally list make files in AC_CONFIG_FILES
  Removed 'thread_dirs', it is not used
  Minor cleanup
compile-dist:
  Simplified the configure line needed for "make dist" to get it all
zlib.m4, ssl.m4:
  Unconditionally list make files in AC_CONFIG_FILES
Makefile.am:
  Removed DIST_SUBDIRS not needed
  Don't copy soft links as files into source package
2007-09-26 18:47:55 +02:00
evgen@sunlight.local
4fd6de8b1a Merge sunlight.local:/local_work/27216-bug-5.0-opt-mysql
into  sunlight.local:/local_work/merge-5.1-opt-mysql
2007-09-24 17:23:40 +04:00
evgen@sunlight.local
36bf417b40 Bug#27216: functions with parameters of different date types may return wrong
type of the result.

There are several functions that accept parameters of different types.
The result field type of such functions was determined based on
the aggregated result type of its arguments. As the DATE and the DATETIME
types are represented by the STRING type, the result field type
of the affected functions was always STRING for DATE/DATETIME arguments.
The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.

Now the affected functions aggregate the field types of their arguments rather
than their result types and return the result of aggregation as their result
field type.
The cached_field_type member variable is added to the number of classes to
hold the aggregated result field type.
The str_to_date() function's result field type now defaults to the
MYSQL_TYPE_DATETIME.
The agg_field_type() function is added. It aggregates field types with help
of the Field::field_type_merge() function.
The create_table_from_items() function now uses the 
item->tmp_table_field_from_field_type() function to get the proper field
when the item is a function with a STRING result type.
2007-09-22 11:49:27 +04:00
tnurnberg@sin.intern.azundris.com
f3b1822c7a Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  mysql.com:/home/tnurnberg/15327/51-15327
2007-09-15 05:12:02 +02:00
tnurnberg@sin.intern.azundris.com
7451aaf48c Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/15327/50-15327
2007-09-15 04:45:20 +02:00
tnurnberg@sin.intern.azundris.com
d5174aad89 Merge mysql.com:/home/tnurnberg/15327/50-15327
into  mysql.com:/home/tnurnberg/15327/51-15327
2007-09-15 04:09:38 +02:00
tnurnberg@mysql.com/sin.intern.azundris.com
3c6ca8d6ed Bug #15327: configure: --with-tcp-port option being partially ignored
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
2007-09-13 16:19:46 +02:00
joerg@trift2.
04d12fc9d6 Merge trift2.:/MySQL/M50/push-5.0
into  trift2.:/MySQL/M51/push-5.1
2007-09-05 09:35:02 +02:00
joerg@trift2.
04b56132a7 libmysql/libmysql.c : Correct a wrong automerge: Don't duplicate "DBUG_ENTER()". 2007-09-05 09:30:50 +02:00
df@pippilotta.erinye.com
ab791bc13d Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work
2007-09-04 10:54:32 +02:00
df@pippilotta.erinye.com
59b504a5e3 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0.48
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
2007-09-04 10:49:54 +02:00
kent@kent-amd64.(none)
ecbff12457 Merge mysql.com:/home/kent/bk/tmp/mysql-5.0-build
into  mysql.com:/home/kent/bk/tmp/mysql-5.1-build
2007-08-29 22:29:58 +02:00
kent@mysql.com/kent-amd64.(none)
edf772aef1 CMakeLists.txt:
Link with library "udf_example" depends on, needed for nmake
libmysql.c:
  DBUG_ENTER need to be in declaration section
2007-08-29 22:29:07 +02:00
df@pippilotta.erinye.com
aab055a485 build fix for aix and others 2007-08-28 15:22:14 +02:00
df@pippilotta.erinye.com
6d068a5ac7 Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
2007-08-24 10:13:03 +02:00
igor@olga.mysql.com
ff3f6e806b Merge olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug30396
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug30396
2007-08-16 17:22:50 -07:00
jbruehe/mysqldev@mysql.com/production.mysql.com
2d4efab366 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/data0/mysqldev/my/mysql-5.1-30367
2007-08-16 18:21:47 +02:00
evgen@moonbone.local
1cc8f0e383 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29948-bug-5.0-opt-mysql
2007-08-14 18:16:34 +04:00
evgen@moonbone.local
4bc4d834fd Bug#29948: Unchecked NULL pointer caused server crash.
The cli_read_binary_rows function is used to fetch data from the server
after a prepared statement execution. It accepts a statement handler and gets
the connection handler from it. But when the auto-reconnect option is set
the connection handler is reset to NULL after reconnection because the
prepared statement is lost and the handler became useless. This case
wasn't checked in the cli_read_binary_rows function and caused server crash.

Now the cli_read_binary_rows function checks the connection handler to be
not NULL and returns an error if it is.
2007-08-14 17:28:51 +04:00
monty@narttu.mysql.fi
9d609a59fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-14 00:22:34 +03:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
kent@mysql.com/kent-amd64.(none)
413d1e1aa4 CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
  - Changed to do embedded build part as normal build, when
    WITH_EMBEDDED_SERVER is set.
  - Allow both normal and debug build with embedded.
  - Build static embedded library by pointing out all source and compile
    it all, i.e. not building libraries from libraries, not portable.
  - Let embedded use generated files from the "sql" directory, added
    dependencies to make sure built before embedded.
  - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
    linked in when debug target is used.
  - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
    others can't depend on it, not defined at configure time. Instead
    set the output file name.
  - Created work around for bug in CMake 2.4.6 and output names, to
    set the "mysqld<suffix>.pdb" name to the same base name.
  - Set the correct manifest "name" (patch by iggy)
2007-08-06 23:16:01 +02:00