Commit graph

28779 commits

Author SHA1 Message Date
unknown
e025e47a76 BUG#16217 forced to introduce a separate mysql client command to adopt its
internal charset to one associated with currently being handled query. 
To note such a query can come from interactive client either.

There was a discussion within replication team and Monty who's suggestion won.
It avoids straightforward parsing of all `set' queries that could affect client side 
character set. 
According to the idea, mysql client does not parse `set' queries but rather cares of
`charset new_cs_name' command.
This command is generated by mysqlbinlog in form of exclaiming comment (Lars' suggestion)
so that enlightened clients like `mysql' knows what to do with it.

Interactive human can switch between many multi-byte charsets during the session 
providing the command explicitly. 
To note that setting new internal mysql's charset does not
trigger sending any `SET' sql statement to the server. 


client/mysql.cc:
  BUG#16217 revealed the problem of switching between charsets in mysql client.
  Such switching is necessary in a case when being scanned query consists of 
  multi-byte chars and internal charset was initialized differently. mysql finds 
  `/' escape and misiterprete it 
  while in fact one could be a part of a multi-byte symbol like the bug page reported. 
  
  This patch extends mysql `charset' command, '\C' shortcut.
mysql-test/r/ctype_ucs_binlog.result:
  comment line generated by mysqlbinlog for processing of logs with multi-byte chars.
mysql-test/r/mysql.result:
  results are altered due to #16217
mysql-test/r/mysqlbinlog.result:
  Results are altered due to #16217
mysql-test/r/mysqlbinlog2.result:
  commeted command for mysql client due to multi-byte binlog
mysql-test/r/rpl_charset.result:
  commented command for mysql due to multi-byte binlogs
mysql-test/r/rpl_timezone.result:
  commented command for mysql client due to multi-byte binlogs
mysql-test/r/user_var-binlog.result:
  commented command for mysql client due to multi-byte binlogs
mysql-test/t/mysql.test:
  Main test for mysql client is extended to check `charset' command.
mysql-test/t/mysqlbinlog.test:
  Checking how /*! \C cs_name */ are added to the output of mysqlbinlog.
  The exclaiming comment is for further processing by mysql client.
  The added part mimics the failure to recover tables from binlog - see BUG#16217.
sql/log_event.cc:
  Sending into output instructions for mysql client to switch internally 
  to appropriate charset.
  mysql client is supposed to be invoked with --default-character-set=
  "to default character set of the server created the binlog".
2006-02-09 16:23:09 +02:00
unknown
543f067dce Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-02-06 09:55:20 +02:00
unknown
b948741b6b ndb - testBlobs needs more tx in 5.0 ?
ndb/test/ndbapi/testBlobs.cpp:
  more tx per Ndb
2006-02-05 23:06:08 +01:00
unknown
eab7743b50 Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/space/pekka/ndb/version/my50
2006-02-05 22:51:13 +01:00
unknown
1076e176ce ndb - bug#16693 (4.1) test + workaround, analyze later
ndb/test/ndbapi/testBlobs.cpp:
  do batched deletes + list commit across open cursor test cases
ndb/tools/delete_all.cpp:
  if blobs, no commit across open cursor (single trans)
  cases listed in testBlobs.cpp, analyze later (in 5.0 maybe)
2006-02-05 22:12:06 +01:00
unknown
75ca5f48cf Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-02-04 10:25:46 +02:00
unknown
26a81f6fb1 Merge mysql.com:/space/pekka/ndb/version/my41
into  mysql.com:/space/pekka/ndb/version/my50


mysql-test/r/ndb_blob.result:
  Auto merged
mysql-test/t/ndb_blob.test:
  Auto merged
ndb/src/ndbapi/NdbBlob.cpp:
  ul
2006-02-03 15:27:26 +01:00
unknown
b301e65883 ndb - replace+tinyblob back-patch from 5.0 [ discard on 4.1->5.0 merge ]
mysql-test/r/ndb_blob.result:
  replace+tinyblob back-patch from 5.0
mysql-test/t/ndb_blob.test:
  replace+tinyblob back-patch from 5.0
ndb/src/ndbapi/NdbBlob.cpp:
  replace+tinyblob back-patch from 5.0
2006-02-03 15:23:58 +01:00
unknown
44d113b14a ndb - bugfix: tinyblob + replace => mysqld crash (no bug#)
mysql-test/r/ndb_blob.result:
  do not delete unknown parts of tinyblob
mysql-test/t/ndb_blob.test:
  do not delete unknown parts of tinyblob
ndb/src/ndbapi/NdbBlob.cpp:
  do not delete unknown parts of tinyblob
2006-02-03 14:35:29 +01:00
unknown
f4266bc468 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-02-03 00:07:57 -08:00
unknown
ac21d0294d Fixes after manual merge 2006-02-02 23:56:08 -08:00
unknown
8300149963 Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/t/having.test:
  Auto merged
mysql-test/r/having.result:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_lex.h:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
sql/sql_select.cc:
  Manual merge
2006-02-02 21:23:36 -08:00
unknown
6757503847 Post-review fix for bug #14927. 2006-02-02 20:37:58 -08:00
unknown
afe4e93ed1 Merge rurik.mysql.com:/home/igor/mysql-4.1
into  rurik.mysql.com:/home/igor/dev/mysql-4.1-0
2006-02-02 17:56:05 -08:00
unknown
a1d55c5d91 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into  rurik.mysql.com:/home/igor/mysql-5.0
2006-02-02 17:39:38 -08:00
unknown
334da85f66 One more post-merge fix.
mysql-test/r/heap.result:
  It turns out that I didn't commit one test result (it's identical 
  to 4.1)
2006-02-03 02:01:01 +03:00
unknown
6a2a94b50b Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/sql_select.cc:
  Auto merged
2006-02-02 13:47:21 -08:00
unknown
2fb59bd72a Post-merge fixes. 2006-02-03 00:07:36 +03:00
unknown
cf4b6ee4c0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-root


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-02-02 23:35:23 +03:00
unknown
86f9bdf8b2 item_timefunc.cc:
manual adding the fix for bug#15828 which did not automerge


sql/item_timefunc.cc:
  manual adding the fix for bug#15828 which did not automerge
2006-02-02 21:27:23 +01:00
unknown
d25eaabe8e Merge mysql.com.:/data/BK/mysql-4.1_15828
into  mysql.com.:/data/BK/mysql-5.0_15828


mysql-test/r/date_formats.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
sql/item_timefunc.cc:
  manually merging fix for bug 15282 - automerge failed as 5.0 was heavely changed
  step one using local for file item_timefunc
2006-02-02 19:10:27 +01:00
unknown
95a3509a66 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root


BitKeeper/deleted/.del-rpl_ignore_table.result:
  Delete: mysql-test/r/rpl_ignore_table.result
BitKeeper/deleted/.del-rpl_multi_update4.result:
  Delete: mysql-test/r/rpl_multi_update4.result
BitKeeper/deleted/.del-rpl_ignore_table-slave.opt:
  Delete: mysql-test/t/rpl_ignore_table-slave.opt
BitKeeper/deleted/.del-rpl_ignore_table.test:
  Delete: mysql-test/t/rpl_ignore_table.test
BitKeeper/deleted/.del-rpl_multi_update4-slave.opt:
  Delete: mysql-test/t/rpl_multi_update4-slave.opt
BitKeeper/deleted/.del-disabled.def:
  Auto merged
BitKeeper/deleted/.del-rpl_multi_update4.test:
  Delete: mysql-test/t/rpl_multi_update4.test
heap/hp_create.c:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/update.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
mysql-test/t/kill.test:
  Auto merged
mysql-test/t/update.test:
  Auto merged
ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
configure.in:
  Manual merge.
libmysql/libmysql.c:
  Manual merge.
mysql-test/r/heap.result:
  Manual merge.
mysql-test/r/heap_hash.result:
  Manual merge.
mysql-test/r/kill.result:
  Manual merge.
sql/ha_heap.cc:
  Manual merge.
sql/ha_heap.h:
  Manual merge.
sql/item_timefunc.cc:
  Manual merge.
sql/sql_class.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-02-02 18:17:18 +03:00
unknown
9b3e6c27b0 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_float_result/my50-mysqltest_float_result
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
2006-02-02 11:47:01 +01:00
unknown
fb6928cb24 Convert exponent results for MYSQL_TYPE_FLOAT on Windows
client/mysqltest.c:
  Do the magic for MYSQL_TYPE_FLOAT as well
2006-02-02 11:45:37 +01:00
unknown
905aa6261e Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-02-02 10:55:54 +02:00
unknown
1a9ed28bd2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-02 08:23:24 +01:00
unknown
7ea60ae91e Fixed bug #16382.
When an ambiguous field name is used in a group by clause a warning is issued
in the find_order_in_list function by a call to push_warning_printf.
An expression that was not always valid was passed to this call as the field
name parameter.


mysql-test/r/view.result:
  Added a test case for bug #16382.
mysql-test/t/view.test:
  Added a test case for bug #16382.
2006-02-01 20:43:43 -08:00
unknown
1e686ae770 fix for bug #12744 (MYSQL_STMT operations cause seg fault after connection reset)
libmysql/libmysql.c:
  stmt->mysql could be 0x0 if the connection has failed between prepare and execute
  or any other operation. thus if the user decides to use mysql_stmt_reset()
  we should not segfault.
tests/mysql_client_test.c:
  test for bug #12744 (MYSQL_STMT operations cause seg fault after connection reset)
2006-02-01 20:35:16 +01:00
unknown
11ec4175f0 Merge mysql.com:/extern/mysql/bk/mysql-5.0
into  mysql.com:/extern/mysql/work/bug15011/mysql-5.0
2006-02-01 16:01:22 +01:00
unknown
6643f32028 Post-review fix for BUG#15011.
Added comments.


sql/sp_rcontext.cc:
  Added comments to sp_rcontext::find_handler()
2006-02-01 16:00:11 +01:00
unknown
f514772df8 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_float_result/my50-mysqltest_float_result
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/r/type_float.result:
  Auto merged
mysql-test/t/type_float.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
2006-02-01 15:02:36 +01:00
unknown
8a7bbefc2f Added new test case for BUG#14533: 'desc tbl' in stored procedure causes error 1142
which is no longer repeatable. (Unclear when this was fixed.)


mysql-test/r/sp-security.result:
  Updated results for new test case (BUG#14533)
mysql-test/t/sp-security.test:
  New test case for BUG#14533.
2006-02-01 14:46:30 +01:00
unknown
94d4b0017b Merge mysql.com:/extern/mysql/bk/mysql-5.0
into  mysql.com:/extern/mysql/work/cantrepeat/mysql-5.0
2006-02-01 12:31:48 +01:00
unknown
db16cfc578 Use common function 'append_field' to output the value of one field to the result.
Fix for extra zero in exponent of double values on windows.


client/mysqltest.c:
  Write new function 'append_field' which takes care of appending one field to the dynamic string.
  Use function 'append_field' from both ps and normal execution
  Add hack to 'append_field' that removes the extra '0' in exponent for double values on Windows.
mysql-test/r/type_float.result:
  One zero too much was removed( I think )
mysql-test/t/insert.test:
  Remove the "replace_result" for extra zero in  exponent
mysql-test/t/type_float.test:
  Remove the "replace_result" for extra zero in  exponent
mysql-test/t/variables.test:
  Remove the "replace_result" for extra zero in  exponent
2006-02-01 11:36:32 +01:00
unknown
a400e7feb9 FIxed bug #14927.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct 
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.


mysql-test/r/having.result:
  Added A test case for bug #14927.
mysql-test/t/having.test:
  Added A test case for bug #14927.
sql/sql_lex.cc:
  Fixed bug #14927.
  Initialized fields for having conditions in  st_select_lex::init_query().
sql/sql_lex.h:
  Fixed bug #14927.
  Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
  Fixed bug #14927.
  Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
  Fixed bug #14927.
  Performed evaluation of constant expressions in having clauses.
  If the having condition contains a constant conjunct that is always false
  an empty result set is returned after the optimization phase.
  In this case the corresponding EXPLAIN command now returns 
  "Impossible HAVING" in the last column.
2006-01-31 21:48:32 -08:00
unknown
86733db80b Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/alexi/innodb/mysql-5.0-ss162
2006-01-31 21:49:20 +03:00
unknown
6a9a96dc61 Fixed: BUG#15653, BUG#16157, BUG#16229, BUG#16298, BUG#16387, BUG#16582.
Applied innodb-5.0-ss149/162 snapshots.


innobase/btr/btr0sea.c:
  Applied innodb-5.0-149/162 snapshots.
    Account for a race condition when dropping the adaptive hash
    index for a B-tree page (Bug #16582).
    btr_search_drop_page_hash_index(): Retry the operation if a
      hash index with different parameters was built meanwhile.
      Add diagnostics for the case that hash node pointers to
      the page remain. This fix is from Heikki.
    btr_search_info-update_hash(), btr_search_info_update_slow():
      Document the parameter "info" as in/out.
innobase/dict/dict0dict.c:
  Applied innodb-5.0-149/162 snapshots.
    Do not mistake TABLENAME_ibfk_0 for auto generated id (Bug #16387).
    dict_table_get_highest_foreign_id(): Ignore foreign constraint
      identifiers starting with the pattern TABLENAME_ibfk_0.
innobase/dict/dict0load.c:
  Applied innodb-5.0-149/162 snapshots.
    dict_load_columns(): Set the charset-collation code
    DATA_MYSQL_BINARY_CHARSET_COLL for those binary string columns
    that lack a charset-collation code, i.e., the tables were created
    with an older version of MySQL/InnoDB than 4.1.2 (Bug #16298).
innobase/fil/fil0fil.c:
  Applied innodb-5.0-149/162 snapshots.
    Keep track on unflushed modifications to file spaces. When there
    are tens of thousands of file spaces, flushing all files in
    fil_flush_file_spaces() would be very slow (Bug #15653).
    fil_flush_file_spaces(): Only flush unflushed file spaces.
    fil_space_t, fil_system_t: Add a list of unflushed spaces.
innobase/include/univ.i:
  Applied innodb-5.0-149/162 snapshots.
    Avoid breaking --with-debug builds on QNS and other systems
    whose compiler pretends to be GCC 2.
    Outside __WIN__ define UNIV_INLINE as static inline.
innobase/os/os0sync.c:
  Applied innodb-5.0-149/162 snapshots.
    Replace goto in os_event_wait with a normal loop.
innobase/srv/srv0start.c:
  Applied innodb-5.0-149/162 snapshots.
    Fix bug #16157, a crash when innodb_log_group_home_dir is set
    to an empty string. This patch is from Heikki.
mysql-test/r/innodb.result:
  Applied innodb-5.0-149/162 snapshots.
    Fixed results for added test cases.
mysql-test/t/innodb.test:
  Applied innodb-5.0-149/162 snapshots.
    Added test cases.
sql/ha_innodb.cc:
  Applied innodb-5.0-149/162 snapshots.
    Remove some declarations of unused global variables and member
      variables of class ha_innobase.
    Added diagnostic code trx_print() to
      innobase_query_caching_of_table_permitted() to find reason
      why we are holding adaptive search latch.
    Fixed bug #16229 MySQL/InnoDB uses full explicit table locks
      in trigger processing. Take a InnoDB table lock only if user
      has explicitly requested a table lock. Added some additional
      comments to store_lock() and external_lock(). Fixed some
      code style errors.
    Remember to use noninlined versions of the functions on
      ha_innodb.cc !
sql/ha_innodb.h:
  Applied innodb-5.0-149/162 snapshots.
    Remove some declarations of unused global variables and member
    variables of class ha_innobase.
2006-01-31 21:41:48 +03:00
unknown
c98077d610 Merge msvensson@msvensson.mysql.internal:/home/msvensson/mysql/bug15302/my41-bug15302
into  devsrv-b.mysql.com:/space/magnus/my41-bug15302
2006-01-31 18:51:15 +01:00
unknown
fd61a0c08d Added test case for BUG#15091: Sp Returns Unknown error in order clause....and there is
no order by clause
which was fixed by earlier changesets.
The error message is now the more generic "Unknown table ... in field list".


mysql-test/r/sp-error.result:
  Updated results for new test case (BUG#15091).
mysql-test/t/sp-error.test:
  New test case for BUG#15091.
2006-01-31 17:00:50 +01:00
unknown
47b9860231 Merge msvensson@bk-internal.mysql.com:/home/bk/mysql-5.0
into  devsrv-b.mysql.com:/space/magnus/my50-bug15302
2006-01-31 16:42:25 +01:00
unknown
c3612b4134 Added test case for BUG#14270: Stored procedures: crash if load index
which was fixed by earlier changesets; LOAD INDEX is not allowed in functions.
  Also testing CACHE INDEX, while OPTIMIZE and CHECK were covered by existing tests already.


mysql-test/r/sp-error.result:
  Updated result for new test case (BUG#14270).
mysql-test/t/sp-error.test:
  New test case for BUG#14270.
2006-01-31 16:27:57 +01:00
unknown
1bbd24a6ee Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/usr/local/mysql/mysql-5.0
2006-01-31 16:24:25 +01:00
unknown
1a53ee1a65 Merge msvensson@msvensson.mysql.internal:/home/msvensson/mysql/bug15302/my50-bug15302
into  devsrv-b.mysql.com:/space/magnus/my50-bug15302


client/mysqltest.c:
  Auto merged
sql/sql_db.cc:
  Auto merged
2006-01-31 15:14:46 +01:00
unknown
b7a9cadde3 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-5.0
2006-01-31 16:11:33 +02:00
unknown
852a5405e6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg16829


sql/sql_yacc.yy:
  Auto merged
2006-01-31 15:51:55 +03:00
unknown
b498114fba Merge neptunus.(none):/home/msvensson/mysql/bug15302/my41-bug15302
into  neptunus.(none):/home/msvensson/mysql/bug15302/my50-bug15302


client/mysqltest.c:
  Already in 5.0
sql/sql_db.cc:
  "mysql_create_db" is already silent in 5.0
2006-01-31 12:52:25 +01:00
unknown
5dda41a717 Merge mysql.com:/extern/mysql/bk/mysql-5.0
into  mysql.com:/extern/mysql/work/bug15737/mysql-5.0
2006-01-31 12:47:36 +01:00
unknown
c35be28149 Bug #15302 LOAD DATA FROM MASTER -> Packets out of order (Found: 2, expected 1)
- Change "mysql_create_db" to not call "send_ok" if in silent mode i.e. called from "load_master_data"
 - Change mysqltest to detect when there aren't as many warnings available as was reported.


client/mysqltest.c:
  Call "die" if warnings were reported but there weren't any warnings to retrieve
sql/sql_db.cc:
  Don't call "send_ok" if in silent mode.
2006-01-31 12:47:22 +01:00
unknown
4675b563e2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg16829


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
2006-01-31 14:43:41 +03:00
unknown
107ad3a03e Check std_data_ln already created
Add / to std_data in ln command


mysql-test/mysql-test-run.sh:
  Check if std_data_ln is already created
  Add / to std_data to create a symlink to a dir an not a file.
2006-01-31 10:48:40 +01:00