Commit graph

598 commits

Author SHA1 Message Date
Ignacio Galarza
54fbbf9591 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Davi Arnaut
3d6cea324a Bug#36326: nested transaction and select
The problem is that the query cache stores packets containing
the server status of the time when the cached statement was run.
This might lead to a wrong transaction status in the client side
if a statement is cached during a transaction and is later served
outside a transaction context (and vice-versa).

The solution is to take into account the transaction status when
storing in and serving from the query cache.

mysql-test/r/innodb_cache.result:
  Update test case result.
mysql-test/r/query_cache.result:
  Add test case result for Bug#36326
mysql-test/t/query_cache.test:
  Add test case for Bug#36326
sql/mysql_priv.h:
  Add new flags.
sql/sql_cache.cc:
  Remember the transaction and autocommit status stored in the packet.
tests/mysql_client_test.c:
  Add test case for Bug#36326
2009-01-13 20:07:06 -02:00
Sergey Glukhov
d2cd545b53 fix for pushbuild failure on 64 linux 2008-12-11 14:37:18 +04:00
Sergey Glukhov
7f5d980af7 disable bug37956 test if geometry package is not enabled 2008-12-11 12:57:59 +04:00
Sergey Glukhov
84de3b930b Bug#37956 memory leak and / or crash with geometry and prepared statements!
Bug#37671 crash on prepared statement + cursor + geometry + too many open files!
if mysql_execute_command() returns error then free materialized_cursor object.
is_rnd_inited is added to satisfy rnd_end() assertion
(handler may be uninitialized in some cases)


sql/sql_cursor.cc:
  if mysql_execute_command() returns error then free materialized_cursor object.
  is_rnd_inited is added to satisfy rnd_end() assertion
  (handler may be uninitialized in some cases)
sql/sql_select.cc:
  added result check
tests/mysql_client_test.c:
  test case
2008-12-10 18:13:11 +04:00
Sergey Glukhov
3a3d3527a3 removed unused variable 2008-11-27 18:26:22 +04:00
Sergey Glukhov
73960af037 Bug#40365 Prepared statements may insert invalid dates.
set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled.


sql/field.cc:
  set DATE|DATETIME value to 0 if ALLOW_INVALID_DATES sql_mode is not enabled.
tests/mysql_client_test.c:
  test case
2008-11-27 16:41:25 +04:00
Sergey Glukhov
de73b72954 Bug#38291 memory corruption and server crash with view/sp/function
Send_field.org_col_name has broken value on secondary execution.
It happens when result field is created from the field which belongs to view
due to forgotten assignment of some Send_field attributes. 
The fix:
set Send_field.org_col_name,org_table_name with correct value during Send_field intialization.

mysql-test/r/metadata.result:
  result fix
  The result file was changed because now forgotten attributes are properly set.
mysql-test/r/sp.result:
  test result
mysql-test/t/sp.test:
  test case
sql/item.cc:
  Send_field.org_col_name has broken value on secondary execution.
  It happens when result field is created from the field which belongs to view
  due to forgotten assignment of some Send_field attributes. 
  The fix:
  set Send_field.org_col_name,org_table_name with correct value during Send_field intialization.
tests/mysql_client_test.c:
  test case fix
  The test was changed because now forgotten attributes are properly set.
2008-08-20 14:49:28 +05:00
Chad MILLER
21598ea0e6 Bug#37301 Length and Max_length differ with no obvious reason(2nd version)
Length value is the length of the field,
Max_length is the length of the field value.
So Max_length can not be more than Length.
The fix: fixed calculation of the Item_empty_string item length

(Patch applied and queued on demand of Trudy/Davi.)

sql/item.h:
  fixed calculation of the item length
sql/sql_show.cc:
  removed unnecessary code
2008-08-15 16:13:27 -04:00
Davi Arnaut
1912eaacc4 Bug#38486: Crash when using cursor protocol
Post-merge fix: mysql_client_test.c is compiled by C compilers
and some C compilers don't support mixed declarations and code
and it's explicitly forbidden by ISO C90.

tests/mysql_client_test.c:
  Don't mix declarations and code.
2008-08-11 20:27:09 -03:00
Kristofer Pettersson
75a5ecbd72 Bug#38486 Crash when using cursor protocol
Server side cursors were not initialized properly and this caused a reference to
uninitialized memory.
2008-08-11 11:40:54 +02:00
Georgi Kodinov
ed78639805 Bug #36887: Typo in mysql_client_test.c uses bind instead of my_bind
There was a typo in a error check causing wrong thing to be ckecked 
and a possible error not being caught.
Fixed by using the correct variable to test for malloc() errors. 

tests/mysql_client_test.c:
  Bug #36887: fixed a typo
2008-05-27 14:33:08 +03:00
unknown
219c7a2a47 Merge amd64.(none):/src/mysql-5.0-bugteam
into  amd64.(none):/src/bug26243/my50-bug26243


libmysql/libmysql.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2008-03-28 16:01:05 -04:00
unknown
a9089cf460 Bug#26243 mysql command line crash after control-c
- Backported the 5.1 DBUG to 5.0.
- Avoid memory cleanup race on Windows client for CTRL-C


client/mysql.cc:
  Bug#26243 mysql command line crash after control-c
  - On Windows, the sigint handler shouldn't call mysql_end
  because the main thread will do so automatically.
  - Remove unnecessary signal call from the sigint handler.
  - Call my_end with proper value.
dbug/dbug.c:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
dbug/factorial.c:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
dbug/user.r:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
include/my_dbug.h:
  Bug#26243 mysql command line crash after control-c
  - Backported the 5.1 DBUG library. The old version uses a non-thread 
  safe global variable 'static struct state *stack'.
libmysql/libmysql.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
myisam/mi_open.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_federated.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_innodb.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/ha_myisammrg.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/item_cmpfunc.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/mysqld.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/net_serv.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/opt_range.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/set_var.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/slave.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/sql_cache.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
sql/sql_select.cc:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
tests/mysql_client_test.c:
  Bug#26243 mysql command line crash after control-c
  - Update for new DBUG library.
2008-03-28 14:02:27 -04:00
unknown
f77686df0d Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0
into  quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


libmysql/libmysql.c:
  Auto merged
sql-common/client.c:
  Auto merged
tests/mysql_client_test.c:
  Manually merged.
2008-03-18 13:53:51 +03:00
unknown
063b504772 Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
The problem was that the COM_STMT_SEND_LONG_DATA was sending a response
packet if the prepared statement wasn't found in the server (due to
reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE
should not send any packets, even error packets should not be sent since
they are not expected by the client API.

The solution is to clear generated during the execution of the aforementioned
commands and to skip resend of prepared statement commands. Another fix is
that if the connection breaks during the send of prepared statement command,
the command is not sent again since the prepared statement is no longer in the
server.


libmysql/libmysql.c:
  The mysql handle might be reset after a reconnection.
  Pass the now used stmt argument to cli_advanced_command.
sql-common/client.c:
  Don't resend command if the connection broke and it's a prepared
  statement command. If the session is broken, prepared statements
  on the server are gone, set the error accordanly.
sql/sql_prepare.cc:
  Clear any error set during the execution of the request
  command.
tests/mysql_client_test.c:
  Fix memory leak by freeing result associated with statement.
  Remove test case for Bug 29948 because it's not reliable in
  5.0 (fixed in 5.1) due to KILL queries sending two packets for
  a thread that kills itself.
2008-03-14 17:40:12 -03:00
unknown
f20fe94b55 Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
Disable test case for bug 29948, which is causing sporadically
failures in other tests inside mysql_client_test.


tests/mysql_client_test.c:
  Disable test case.
2008-03-13 12:14:14 +03:00
unknown
615db68d85 Re-enabled the test for mysql_insert_id() after merging from main. 2008-03-12 12:13:41 +03:00
unknown
09f8a4af63 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


client/mysql.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
2008-03-12 10:59:15 +03:00
unknown
aafb492d59 Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures
Disable test case for bug 29948, which is causing sporadically
failures in other tests inside mysql_client_test.


tests/mysql_client_test.c:
  Disable test case.
2008-03-06 09:16:53 -03:00
unknown
0c1dd98ec8 Fix for bug #34889: mysql_client_test::test_mysql_insert_id test fails
sporadically

Under some circumstances, the mysql_insert_id() value after SELECT ...
INSERT could return a wrong value. This could happen when the last
SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the
value of mysql_insert_id() was changed by some previous statements.

Fixed by checking the value of thd->insert_id_used in
select_insert::send_eof() and returning 0 for mysql_insert_id() if it
is not set.


sql/sql_insert.cc:
  Do not return thd->last_insert_id unconditionally in
  select_insert::send_eof(). First check if thd->insert_id_used is
  non-zero, and return 0 otherwise.
tests/mysql_client_test.c:
  Added a test case for bug #34889.
2008-03-05 16:02:33 +03:00
unknown
b43f8f695c Eliminate compilation warning. 2008-02-27 22:29:58 +03:00
unknown
e78d896c3f Bug#34889 mysql_client_test::test_mysql_insert_id test fails sporadically
Disable the test case.


tests/mysql_client_test.c:
  Disable test case.
2008-02-27 13:05:46 -03:00
unknown
24039016f0 Fix memory leaks (valgrind) 2008-02-26 15:27:46 +03:00
unknown
d34f8384b3 Post-merge fix to silence a compilation warning introduced
by patch for bug 32265 .


tests/mysql_client_test.c:
  Removed unused variable.
2008-02-20 22:11:06 -03:00
unknown
a399fefd56 Bug#32265 Server returns different metadata if prepared statement is used
Executing a prepared statement associated with a materialized
cursor yields to the client a metadata packet with wrong table
and database names. The problem was occurring because the server
was sending the the name of the temporary table used by the cursor
instead of the table name of the original table. The same problem
occurs when selecting from views, in which case the table name was
being sent and not the name of the view.
  
The solution is to fill the list item from the temporary table but
preserving the table and database names of the original fields. This
is achieved by tweaking the Select_materialize to accept a pointer to
the Materialized_cursor class which contains the item list to be filled.


sql/sql_cursor.cc:
  Fill the item list in the send_fields method and preserve
  the table and database name of the fields.
tests/mysql_client_test.c:
  Add test case for Bug#32265
2008-02-20 16:45:24 -03:00
unknown
0baec33ff3 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/my50-mrg


tests/mysql_client_test.c:
  Auto merged
2007-12-01 13:12:31 +04:00
unknown
07be2ef594 Merge polly.(none):/home/kaa/src/opt/bug9481/my50-bug9481
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-11-30 18:45:35 +03:00
unknown
1d062682f5 Bug #32624 Error with multi queries in MySQL embedded server 5.1.22.
server status wasn't properly sent to the client after the error
by the embedded server. Wasn't noticed before as one usually stopped
retrieving results after he gets an error.


libmysqld/lib_sql.cc:
  Bug #32624 Error with multi queries in MySQL embedded server 5.1.22.
  
  server status transferred to the client after errors
sql/protocol.cc:
  Bug #32624 Error with multi queries in MySQL embedded server 5.1.22.
  
  set server status before net_send_error_packet() call as this
  function sends it to the client in the embedded server
tests/mysql_client_test.c:
  Bug #32624 Error with multi queries in MySQL embedded server 5.1.22.
  
  testcase added
2007-11-29 10:37:07 +04:00
unknown
1836b73600 5.0 version of the fix for bug #9481: mysql_insert_id() returns 0 after
insert ... select.

The 5.0 manual page for mysql_insert_id() does not mention anything
about INSERT ... SELECT, though its current behavior is incosistent
with what the manual says about the plain INSERT.

Fixed by changing the AUTO_INCREMENT and mysql_insert_id() handling
logic in INSERT ... SELECT to be consistent with the INSERT behavior,
the manual, and the changes in 5.1 introduced by WL3146:


- mysql_insert_id() now returns the first automatically generated
AUTO_INCREMENT value that was successfully inserted by INSERT ... SELECT

-  if an INSERT ... SELECT statement is executed, and no automatically
generated value is successfully inserted, mysql_insert_id() now returns
the ID of the last inserted row.


sql/sql_class.h:
  Replaced last_insert_id with autoinc_value_of_last_inserted_row to be
  consistent with 5.1 code.
sql/sql_insert.cc:
  Revised the AUTO_INCREMENT and mysql_insert_id() handling logic in
  INSERT ... SELECT to be consistent with INSERT behavior, the manual, and
  changes in 5.1 introduced by WL3146:
  
  - mysql_insert_id() now returns the first automatically generated
  AUTO_INCREMENT value that was successfully inserted;
  
  -  if an INSERT ... SELECT statement is executed, and no automatically
  generated value is successfully inserted, mysql_insert_id() now returns
  the ID of the last inserted row.
tests/mysql_client_test.c:
  Backported the test cases related to INSERT ... SELECT and
  mysql_insert_id() from WL3146 patch to 5.0.
2007-11-26 18:36:05 +03:00
unknown
10c1aa796a Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B32400-5.0-opt


tests/mysql_client_test.c:
  Auto merged
mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2007-11-23 15:30:16 +02:00
unknown
10e1f245c4 Merge polly.(none):/home/kaa/src/opt/bug32221/my50-bug31445
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


tests/mysql_client_test.c:
  Auto merged
2007-11-22 14:53:41 +03:00
unknown
870d46819e Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.


mysql-test/include/ps_query.inc:
  Bug #32400: fixed old test queries
mysql-test/r/ps_2myisam.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_3innodb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_4heap.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_5merge.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_6bdb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_7ndb.result:
  Bug #32400: fixed old test queries
mysql-test/r/subselect.result:
  Bug #32400: test case
mysql-test/t/subselect.test:
  Bug #32400: test case
sql/item.cc:
  Bug #32400: don't allow references to aliases in WHERE
tests/mysql_client_test.c:
  Bug #32400: fixed old test queries
2007-11-20 19:18:21 +02:00
unknown
c4d0901d00 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.


BitKeeper/deleted/.del-mytest.c:
  Delete: libmysql/mytest.c
BitKeeper/deleted/.del-myTest-package.dsp:
  Delete: VC++Files/libmysqltest/myTest-package.dsp
BitKeeper/deleted/.del-myTest-package_ia64.dsp:
  Delete: VC++Files/libmysqltest/myTest-package_ia64.dsp
BitKeeper/deleted/.del-myTest.dsp~4a8c480769193952:
  Delete: VC++Files/libmysqltest/myTest.dsp
BitKeeper/deleted/.del-myTest.vcproj:
  Delete: VC++Files/libmysqltest/myTest.vcproj
BitKeeper/deleted/.del-myTest_ia64.dsp:
  Delete: VC++Files/libmysqltest/myTest_ia64.dsp
BitKeeper/deleted/.del-mytest.c~9a99338689e5de8:
  Delete: VC++Files/libmysqltest/mytest.c
BitKeeper/deleted/.del-mytest.dsw~2324698861155335:
  Delete: VC++Files/libmysqltest/mytest.dsw
VC++Files/copy_mysql_files.bat:
  Removed references to libmysqltest.
libmysql/CMakeLists.txt:
  Removed rules for myTest.
libmysql/Makefile.am:
  Removed mytest.c from EXTRA_DIST.
tests/bug25714.c:
  Display a meaningful error message when run incorrectly or with the --help option.
tests/mysql_client_test.c:
  In case of error, don't cause abnormal program termination, do a clean exit() with an error status.
2007-11-19 18:59:25 +03:00
unknown
157645f45e Merge moksha.local:/Users/davi/mysql/bugs/31669-5.0
into  moksha.local:/Users/davi/mysql/mysql-5.0-runtime


libmysql/libmysql.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-30 09:41:24 -03:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
unknown
22e972ffeb 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.


libmysql/libmysql.c:
  Increase the buffer size and perform bounds checking when copying
  the supplied arguments.
tests/mysql_client_test.c:
  Add test case for Bug#31669
2007-10-23 09:05:39 -03:00
unknown
084cbc7ed8 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/27990-bug-5.0-opt-mysql


sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-09-28 23:27:23 +00:00
unknown
6a8bd84a82 Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
The change_to_use_tmp_fields function leaves the orig_table member of an
expression's tmp table field filled for the new Item_field being created.
Later orig_table is used by the Field::make_field function to provide some
info about original table and field name to a user. This is ok for a field
but for an expression it should be empty.

The change_to_use_tmp_fields function now resets orig_table member of
an expression's tmp table field to prevent providing a wrong info to a user.
The Field::make_field function now resets the table_name and the org_col_name
variables when the orig_table is set to 0.


sql/field.cc:
  Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
  The Field::make_field function now resets the table_name and the org_col_name
  variables when the orig_table is set to 0.
sql/sql_select.cc:
  Bug#27990: Wrong info in MYSQL_FIELD struct members when a tmp table was used.
  The change_to_use_tmp_fields function now resets orig_table member of
  an expression's tmp table field to prevent providing a wrong info to a user.
tests/mysql_client_test.c:
  The test case for the bug#21635 is altered to test behavior on both const and
  non-const tables.
2007-09-28 23:24:40 +00:00
unknown
613f7ff3b5 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/15327/50-15327


client/mysql.cc:
  Auto merged
client/mysql_upgrade.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-09-15 04:45:20 +02:00
unknown
ee7f125d5f 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)


client/mysql.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysql_upgrade.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqladmin.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlbinlog.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlcheck.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqldump.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlimport.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlmanagerc.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
configure.in:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  If MYSQL_TCP_PORT defaulted in configure (factory default 3306
  at the time of this writing), set MYSQL_TCP_PORT to factory
  default, then clear factory default after. That way, we lose no
  information, and we can distinguish between "defaulted" and the
  pathological case "builder specifically configured a port that
  coincides with factory default." This can in theory happen if
  builder configures and builds several servers from a script
  (--with-tcp-port=3306, --with-tcp-port=3316, --with-tcp-port=3326).
  Not all that probable, but much preferable to having more "magic"
  happen in the server when we can solve this without any guesswork.
client/mysqlshow.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqltest.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
include/mysql_version.h.in:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
libmysql/libmysql.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  initialize default tcp port for client, like so:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
  - environment variable MYSQL_TCP_PORT overrides this default
  - command-line option overrides all of the above
mysql-test/Makefile.am:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
mysql-test/mysql-test-run-shell.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  set up MYSQL_TCP_PORT if not already set in environment:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
netware/mysql_test_run.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
netware/mysqld_safe.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
scripts/Makefile.am:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
scripts/mysql_config.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  set up MYSQL_TCP_PORT if not already set in environment:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
scripts/mysql_fix_privilege_tables.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  clarifying notice only
scripts/mysqld_safe-watch.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
server-tools/instance-manager/priv.h:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
sql/mysqld.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  if builder specifically requested a default port, use that
  (even if it coincides with our factory default).
  only if they didn't do we check /etc/services (and, failing
  on that, fall back to the factory default of 3306).
  either default can be overridden by the environment variable
  MYSQL_TCP_PORT, which in turn can be overridden with command
  line options.
tests/mysql_client_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
tests/ssl_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
tests/thread_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
2007-09-13 16:19:46 +02:00
unknown
bbf2211bdc mysql_client_test.c:
Post fix for the bug#29948.


tests/mysql_client_test.c:
  Post fix for the bug#29948.
2007-08-15 18:21:58 +04:00
unknown
83fdcb2b7b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29948-bug-5.0-opt-mysql


tests/mysql_client_test.c:
  Manually merged
2007-08-14 18:16:34 +04:00
unknown
e34aa82da9 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.


tests/mysql_client_test.c:
  Added a test case for the bug#29948: Unchecked NULL pointer caused server crash.
libmysql/libmysql.c:
  Bug#29948: Unchecked NULL pointer 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
unknown
e6701d746d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


mysql-test/r/federated.result:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
sql/item.cc:
  Auto merged
2007-08-08 11:34:35 +04:00
unknown
c7f2a5e718 A fix and a test case for Bug#29306 "Truncated data in MS Access with decimal (3,1) columns in a
VIEW".

mysql_list_fields() C API function would incorrectly set MYSQL_FIELD::decimals
member for some view columns.

The problem was in an incomplete implementation of 
Item_ident_for_show::make_field(), which is responsible for view
columns metadata.


sql/item.cc:
  A fix for Bug#29306 -- properly initialize decimals in 
  Item_ident_for_show::make_field
tests/mysql_client_test.c:
  Add a test case forBug#29306. Fix warnings.
2007-08-06 14:22:24 +04:00
unknown
6e20710c6c Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/cmake-tls/mysql-5.0-build
2007-08-02 15:39:34 +02:00
unknown
def8d6b363 CMakeLists.txt (several), make_win_bin_dist:
Aligned client library build and use with the Unix version when it
  comes to what source to include directly in the builds, and what
  libraries to link with (bug#30118).

  Also reviewed, corrected and made more clear when static or dynamic
  Thread Local Storage is to be used. Some code duplication was removed,
  and some redundant library usage were removed, reducing the risk of
  incorrect TLS usage.


client/CMakeLists.txt:
  - Removed code duplication by moving build of "mysqlclient" to
    the "libmysql" directory
  - Link clients with the new "mysqlclient_notls", to protect for
    the case the clients use more than the client API, and access
    thread data directly.
  - Synced explicit target addition of sources with Unix.
dbug/CMakeLists.txt:
  No need to set CXX flags, no C++ code
libmysql/CMakeLists.txt:
  - Aligned more with Unix version when it comes to included source files
  - Build both DLL and static library in this directory
  - Produce separe static TLS version of the static client library, for
     use when building clients in this build that might access TLS
     storage directly.
mysys/CMakeLists.txt:
  We only have to build the static TLS version, as no clients are
  linking directly with the "mysys" library.
scripts/make_win_bin_dist:
  Ajusted paths to new "mysqlclient.lib" location in source tree
sql/CMakeLists.txt:
  Removed duplicate "ha_blackhole.cc" in file listing
  Removed explicit link to "dbug.lib" not needed
  Link with the static TLS "mysqlclient_notls"
tests/CMakeLists.txt:
  Removed explicit link to "dbug", "mysys", "yassl", "taocrypt" and
  "zlib" not needed.
  Added explicit source addition "../mysys/my_memmem.c".
  No need for setting CXX flags, no C++ code.
  Use the static TLS "mysqlclient_notls" for linkage.
zlib/CMakeLists.txt:
  No need for a dynamic TLS version of this library, no access to thread
  storage is done from it. Also no need to define MYSQL_CLIENT, not used,
  or __WIN32__ that is handled by the library header without this define.
2007-08-02 12:49:27 +02:00
unknown
5415dcc337 fix compile on Windows for bug25714.c
---
fix compile on Windows for bug25714.c


tests/bug25714.c:
  fix compile on Windows
2007-07-24 10:50:28 -07:00
unknown
4ab0c0cf49 build bug25714 test app on Windows 2007-07-24 09:32:51 -07:00