Commit graph

172 commits

Author SHA1 Message Date
unknown
ca98fb63ad Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/embt/my41-embt


libmysqld/lib_sql.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2006-12-08 15:15:33 +04:00
unknown
760bd9d166 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.local:/opt/local/work/mysql-4.1-runtime


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
2006-11-29 02:39:17 +03:00
unknown
2d04b1914d BUG#23383: mysql_affected_rows() returns different values than
mysql_stmt_affected_rows()

The problem was that affected_rows for prepared statement wasn't updated
in the client library on the error.  The solution is to always update
affected_rows, which will be equal to -1 on the error.


libmysql/libmysql.c:
  Update status variables even in the case of an error.  Some variables
  have a defined value on the error (like affected_rows is -1), others are
  undefined, so updating them won't harm.
libmysqld/lib_sql.cc:
  Update status variables even in the case of an error.  Some variables
  have a defined value on the error (like affected_rows is -1), others are
  undefined, so updating them won't harm.
tests/mysql_client_test.c:
  Add test for bug#23383: mysql_affected_rows() returns different values
  than mysql_stmt_affected_rows().
2006-11-17 12:21:32 +03:00
unknown
28f6e13299 embedded-mode tests fixed
libmysqld/examples/test-run:
  mysql_embedded should be run here
libmysqld/lib_sql.cc:
  thd->real_id setup added
  bootstrap check added
mysql-test/t/innodb.test:
  paths can be different in embedded server - replace_result added
sql/item_func.cc:
  we should compare real_id-s in embedded server
2006-11-13 10:39:15 +04:00
unknown
6c4aa883ce Bug #23427 (incompatible ABI change)
the incompatibility was caused by current_stmt member added to the MYSQL
structure.
It's possible to move it to THD structure instead which saves ABI


include/mysql.h:
  member moved to the THD structure
libmysqld/lib_sql.cc:
  now we use THD member here
sql/sql_class.h:
  current_stmt member added for the embedded server
2006-10-24 17:19:02 +05: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
d9992cc79e Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.16017


include/sql_common.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
libmysqld/libmysqld.c:
  merging
2006-07-13 22:32:18 +05:00
unknown
8b6c2d312b bug #20318 (ctype_ucs2_def test fails with embedded)
there was two problems about charsets in embedded server
1. mysys/charset.c - defined there default_charset_info variable is
modified by both server and client code (particularly when
--default-charset option is handled)
In embedded server we get two codelines modifying one variable.
I created separate default_client_charset_info for client code

2. mysql->charset and mysql->options.charset initialization isn't
properly done for embedded server - necessary calls added


include/sql_common.h:
  client charset info default declared
libmysqld/lib_sql.cc:
  thd_init_client_charset calls added
libmysqld/libmysqld.c:
  check_embedded_connection moved to client.c to avoid code duplication
sql-common/client.c:
  charset initialization moved to mysql_init_character_set to
  be used in embedded server
sql/sql_parse.cc:
  thread client charset initialization moved to thd_init_client_charset
  to avoid code duplication
2006-06-19 22:11:01 +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
eadcf20081 bug #16017 (memory leaks in embedded server)
There actually was 3 different problems -
hash_user_connections wasn't cleaned
one strdupped database name wasn't freed
and stmt->mem_root wasn't cleaned as it was
replased with mysql->field_alloc for result
For the last one - i made the library using stmt's
fields to store result if it's the case.


include/mysql.h:
  statement pointer added to the advanced_command to be checked in
  embedded server
include/sql_common.h:
  stmt added to the cli_advanced_command interface
libmysql/libmysql.c:
  stmt pointer now sent to advanced_command
libmysqld/embedded_priv.h:
  it's enough to send database name to check_embedded_connection
libmysqld/lib_sql.cc:
  Now we store result directly in the MYSQL_STMT structure to
  avoid extra copying
libmysqld/libmysqld.c:
  it's enough to only send database pointer to check_embedded_connection
sql-common/client.c:
  stmt fake attribute added to cli_advanced_command
sql/sql_parse.cc:
  hash_user_connections isn't used if no access checks compiled
2006-06-01 17:06:42 +05:00
unknown
06313b18f2 Fix for bug #13501 "build problem: too many arguments to function my_bool
acl_init".

Updated calls to acl_init()/grant_init() in init_embedded_server() - their
signatures were changed recently, now they don't need argument for passing
pointer to THD object (this code was only compiled if one built embedded
server library with --with-embedded-privilege-control switch).


libmysqld/lib_sql.cc:
  acl_init/grant_init() are now used only at server start up so they always
  allocate temporary THD object and don't need argument for passing pointer
  to it.
2005-09-27 23:36:02 +04:00
unknown
1911750354 Fix for bug #9110 (Max_join_size error)
libmysqld/lib_sql.cc:
  This should be done during the thread activation
2005-07-26 12:08:00 +05:00
unknown
62113c1011 A fix for Bug#7365 "embedded server for MacOS: problem with prepared
statements": no test case, the test case is there already, 
libmysqld/examples/client_test.c, we just need to run it on a daily basis.


libmysqld/lib_sql.cc:
  Convert statement id to least significant byte first format,
  uset for data transmission in MySQL protocol. It's assumed to be 
  in this format by mysql_stmt_execute.
2005-01-11 18:02:44 +03:00
unknown
ca756fa5a5 Tabs removed 2004-12-21 12:31:38 +04:00
unknown
b277c36a61 Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.clean


libmysqld/lib_sql.cc:
  Auto merged
2004-12-21 10:26:01 +04:00
unknown
fee2e57b67 Fix to perform correctly with charsets in embedded server
BitKeeper/deleted/.del-ctype_recoding.result.es~45c6fe567949af:
  Delete: mysql-test/r/ctype_recoding.result.es
BitKeeper/deleted/.del-func_test.result.es~4de135264090aa14:
  Delete: mysql-test/r/func_test.result.es
BitKeeper/deleted/.del-ps_2myisam.result.es~5132bde9c07c41e8:
  Delete: mysql-test/r/ps_2myisam.result.es
BitKeeper/deleted/.del-ps_3innodb.result.es~a3613f0e86132472:
  Delete: mysql-test/r/ps_3innodb.result.es
BitKeeper/deleted/.del-ps_4heap.result.es~956ae2c46b66b6ed:
  Delete: mysql-test/r/ps_4heap.result.es
BitKeeper/deleted/.del-ps_5merge.result.es~6093a834fec21efe:
  Delete: mysql-test/r/ps_5merge.result.es
BitKeeper/deleted/.del-ps_6bdb.result.es~57b94c3756e3d093:
  Delete: mysql-test/r/ps_6bdb.result.es
libmysqld/lib_sql.cc:
  Charset conversion implemented
mysql-test/r/query_cache.result.es:
  correct test result provided
tests/client_test.c:
  now it works
2004-12-21 10:05:58 +04:00
unknown
6cbcd3423a Fix assertion failure in client_test when linked with the embedded
library: stmt_update_metadata (used when we update max_length
in mysql_stmt_store_result) needs valid row->length.


libmysqld/lib_sql.cc:
  row->length is asserted to be valid in stmt_update_metadata
2004-12-19 20:28:52 +03:00
unknown
2c82ee2f64 Fix for bug #5066(Wrong result after subselect with an error)
In this case we have to clear thd->data after errorneous query.
So i just move thd->data cleanup to emb_advanced_command


libmysqld/lib_sql.cc:
  Cleaning thd->data moved to emb_advanced_command
2004-08-23 13:20:34 +05:00
unknown
37c025e6f9 Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.emb


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2004-08-19 15:47:09 +05:00
unknown
84779aef24 addition to fixes about #4700, 4701
libmysqld/lib_sql.cc:
  Comment added
sql/sql_prepare.cc:
  Necessary line added to emb_insert_params_with_log
2004-08-19 15:36:05 +05:00
unknown
93f773aa47 bug#4817 catalog name is "def" 2004-07-30 22:15:52 +02:00
unknown
205703ff06 Several fixes to make tests working for embedded library
libmysqld/lib_sql.cc:
  max_allowed_packet - don't send client one to global
  thread initialization fixed
  "std" to "def" in catalog name
sql/mysqld.cc:
  added initialization of global_system_variables.max_allowed_packet
sql/set_var.cc:
  don't do this in embedded library
2004-07-23 00:00:50 +05:00
unknown
2cd7e4cdef Fixes for bugs in embedded library:
#4700 (Unsigned value returned as signed)
    just no appropriate checking
#4701 (Errors returned earlier than expected)
    all errors returned from send_command()
#4702 (Result isn't freed properly if there's no retrieval)
    flush_use_result has only 'client' version and should
    be made 'virtual'


include/mysql.h:
  flush_use_result 'virtual' method added to MYSQL (#4701)
include/sql_common.h:
  no flush_use_result() now (#4702)
libmysql/libmysql.c:
  call of the flush_use_result changed (#4702)
libmysqld/lib_sql.cc:
  now errors returned from emb_advanced_command() or from emb_read_rows()
  depending on if number of returned fields is not 0 (#4701)
  emb_flush_use_result() implementation (#4702)
sql-common/client.c:
  cli_flush_use_result() implementation (#4702)
sql/sql_prepare.cc:
  unsigned flag now checked (#4700)
2004-07-22 20:54:25 +05:00
unknown
6aaccbcbf7 WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public
domain elsie-code). Now user can select current time zone
(from the list of time zones described in system tables).
All NOW-like functions honor this time zone, values of TIMESTAMP
type are interpreted as values in this time zone, so now
our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH
LOCAL TIME ZONE (or proper PostgresSQL type).
  
WL#1266 "CONVERT_TZ() - basic time with time zone conversion 
function".
  
Fixed problems described in Bug #2336 (Different number of warnings 
when inserting bad datetime as string or as number). This required
reworking of datetime realted warning hadling (they now generated 
at Field object level not in conversion functions).
  
Optimization: Now Field class descendants use table->in_use member
instead of current_thd macro.


include/my_global.h:
  Added macro for reading of 32-bit ints stored in network order from
  unaligned memory location.
include/mysqld_error.h:
  Added error-code for invalid timestamp warning and error-code
  for wrong or unknown time zone specification.
libmysqld/Makefile.am:
  Added main per-thread time zone support file to libmysqld
libmysqld/lib_sql.cc:
  Added initialization of time zones infrastructure to embedded server.
mysql-test/r/connect.result:
  Updated test result since now mysql database contains more
  system tables.
mysql-test/r/date_formats.result:
  Now when truncation occurs during conversion to datetime value we are producing Warnings 
  instead of Notes. Also we are giving more clear warnings about this in some cases.
mysql-test/r/func_sapdb.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling.
mysql-test/r/func_time.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling.
mysql-test/r/select.result:
  New warnings about truncation occured during conversion to datetime value added due
  their better handling. Also tweaked test a bit to made it less ambigious for reader.
mysql-test/r/system_mysql_db.result:
  Updated test result because new system tables holding time zone descriptions were 
  added.
mysql-test/r/timezone.result:
  Updated timezone.test to use new system variable which shows system time zone.
  Added test of warning which is produced if someone tries to store non-existing (due 
  falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/r/type_datetime.result:
  Separated and extended test of values and warnings produced for bad values stored in 
  DATETTIME fields.
mysql-test/r/type_time.result:
  Now we are producing more consistent warning when we are truncating datetime value while
  storing it in TIME field.
mysql-test/r/type_timestamp.result:
  Separated and extended test of values and warnings produced for bad
  values stored in TIMESTAMP fields.
mysql-test/t/select.test:
  Updated test to make it less ambigous for reader.
mysql-test/t/timezone.test:
  Updated timezone.test to use new system variable which shows system time zone.
  Added test of warning which is produced if someone tries to store non-existing (due 
  falling into spring time-gap) datetime value into TIMESTAMP field.
mysql-test/t/type_datetime.test:
  Separated and extended test of values and warnings produced for bad
  values stored in DATETTIME fields.
mysql-test/t/type_timestamp.test:
  Separated and extended test of values and warnings produced for bad
  values stored in TIMESTAMP fields.
scripts/mysql_create_system_tables.sh:
  Added creation of tables with time zone descriptions.
  Also added descriptions of time zones used in tests.
scripts/mysql_fix_privilege_tables.sql:
  Added mysql.time_zone* tables family.
sql/Makefile.am:
  Added files implementing time zone support to server, also added
  rules for building of mysql_tzinfo_to_sql converter and test_time
  test.
sql/field.cc:
  Now we are using per-thread time zone for TIMESTAMP <-> whatever conversion.
  Fixed generation of warnings for datetime types (DATETIME/TIMESTAMP/DATE/...) and
  any other Field to datetime conversion (now we are generating warnings no in lower
  level functions like in str_to_TIME() but in Field methods. This allows generate
  better and more consistent warnings and to reuse code of str_to_TIME() outside of
  server).
  
  Added 3rd parameter to set_warning() method to be able to not increment cut fields
  but still produce a warning. Also added set_datetime_warning() family of auxiliary 
  methods which allow easier generate datetime related warnings.
  Also replaced occurences of current_thd with table->in_use member, added
  asserts for catching all places there we need to set table->in_use
  accordingly. Renamed fix_datetime() function to number_to_TIME() and
  moved it to sql/time.cc there it fits better.
sql/field.h:
  Added comment about places where we can use table->in_use member
  instead of current_thd.
  Added 3rd parameter to Field::set_warning() method and set_datetime_warning()
  family of methods.
sql/field_conv.cc:
  Field::set_warning() method with 2 arguments was replaced with more 
  generic set_warning() method with 3 arguments.
sql/ha_berkeley.cc:
  Now we set table->in_use for temporary tables so we have to use
  table->tmp_table for checking if table is temporary.
sql/item.cc:
  Replaced calls to str_to_time() and str_to_TIME() funcs with their warning
  generating analogs.
sql/item_create.cc:
  Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_create.h:
  Added creation of CONVERT_TZ function as FUNC_ARG3.
sql/item_timefunc.cc:
  Added support of per-thread time zone to NOW-like and FROM_UNIXTIME,
  UNIX_TIMESTAMP functions. 
  Added support for CONVERT_TZ function.
  Removed call to str_to_timestamp function which caused non-optimal
  behavior in certain cases. Replaced calls to str_to_time() function 
  with its warning generating analog.
sql/item_timefunc.h:
  Added support of per-thread time zone to NOW-like and
  FROM_UNIXTIME, UNIX_TIMESTAMP functions.
  Added support of CONVERT_TZ function.
sql/lex.h:
  Added support of CONVERT_TZ function.
sql/log.cc:
  Added support for replication of statements depending on time zone.
sql/mysql_priv.h:
  Now including headers with per-thread time zone support functions
  and classes. Added portable replacement of time_t - my_time_t type. 
  Added time zone as one of query distinguishing parameters for
  query cache. 
  Fixed declarations of str_to_TIME, str_to_time and 
  my_system_gmt_sec (former my_gmt_sec) since now they have one more
  out parameter which informs about wrong datetime value or data 
  truncation during conversion.
  Added warning generating version of str_to_TIME() and str_to_time()
  functions.
  Thrown away str_to_datetime/timestamp functions since they are not
  needed any longer. Added number_to_TIME function.
sql/mysqld.cc:
  Added per-thread time zone support initialization.
  Added new startup parameter --default-time-zone.
sql/set_var.cc:
  Added support for per-thread time_zone variable.
  Renamed old timezone variable to system_time_zone.
sql/set_var.h:
  Added support for per-thread time_zone variable.
sql/share/czech/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/danish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/dutch/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/english/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/estonian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/french/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/german/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/greek/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/hungarian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/italian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/japanese/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/korean/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/norwegian-ny/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/norwegian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/polish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/portuguese/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/romanian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/russian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/serbian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/slovak/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/spanish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/swedish/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/share/ukrainian/errmsg.txt:
  Added error message for barking when incorrect time zone name or
  specifiaction is provided and for warning about invalid TIMESTAMP
  values (e.g. falling into the spring time-gap).
sql/slave.cc:
  In order to support replication of statements using time zones in 4.1 we should 
  ensure that both master and slave have same default time zone.
sql/sql_base.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
  calls to Field::store or val_ methods).
sql/sql_cache.cc:
  Added time zone as one more query distinguishing parameter
  for query cache.
sql/sql_class.cc:
  Added THD::time_zone_used variable indicating that this query
  uses per thread time zone.
sql/sql_class.h:
  Added per-thread time zone variable. Added THD::time_zone_used
  variable indicating that this query uses per thread time zone
  so if this is updating query the time zone should be logged to 
  binlog.
sql/sql_insert.cc:
  We should set TABLE::in_use member pointing to thread which is called
  INSERT DELAYED and not to worker thread.
sql/sql_load.cc:
  Field::set_warning() now has one more argument now.
sql/sql_parse.cc:
  Resetting THD::time_zone_used variable in the end of query
  processing.
sql/sql_select.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
  calls to Field::store or val_ methods).
sql/sql_show.cc:
  Now using per thread time zone for extended show tables.
sql/time.cc:
  Added support for per-thread time zones for TIMESTAMP type and
  reworked generation of warnings for TIMESTAMP and DATETIME types.
  (Introduced new TIME_to_timestamp() function. Removed hours 
  normalisation from former my_gmt_sec() since it was not working 
  and not used anywhere now, but breaks parameter constness, added
  to this function generation of warning if we are falling in spring 
  time-gap. Removed str_to_timestamp and str_to_datetime functions 
  which are no longer used. Moved fix_datetime function from
  sql/field.cc to this file as number_to_TIME() function. Added
  out parameter for str_to_TIME and str_to_time functions which
  indicates if value was truncated during conversion, removed direct 
  generation of warnings from this functions.)
sql/unireg.cc:
  Now we are setting TABLE::in_use member for all tables (which assume
    calls to Field::store or val_ methods).
BitKeeper/etc/ignore:
  Added sql/test_time sql/mysql_tzinfo_to_sql libmysqld/tztime.cc to the ignore list
2004-06-18 10:11:31 +04:00
unknown
c56613fb3c fix for bug #3974 ("SHOW FULL PROCESSLIST" crashes the embedded server)
server crashed checking thd->priv_user[0] and thd->priv_user is NULL
if NO_EMBEDDED_ACCESS_CHECKS is on.
Now i set it to be the same as thd->user


libmysqld/lib_sql.cc:
  now priv_user won't be NULL
2004-06-09 23:10:09 +05:00
unknown
abd68407bf After merge fixes
Docs/manual_toc.html:
  Rename: BitKeeper/deleted/.del-manual_toc.html~f483f2d33d9acb41 -> Docs/manual_toc.html
libmysqld/lib_sql.cc:
  Fixed type of new variables
libmysqld/libmysqld.c:
  Removed duplicate function (allready in libmysql.c)
2004-05-27 02:50:42 +03:00
unknown
7c5cd4125d merge with 4.0 to get windows fixes
VC++Files/client/mysqlclient.dsp:
  Auto merged
VC++Files/innobase/innobase.dsp:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
innobase/include/log0log.h:
  Auto merged
innobase/include/log0log.ic:
  Auto merged
innobase/include/mtr0mtr.h:
  Auto merged
innobase/log/log0log.c:
  Auto merged
innobase/log/log0recv.c:
  Auto merged
innobase/que/que0que.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysql_r/Makefile.am:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
tools/mysqlmanager.c:
  Auto merged
2004-05-27 00:30:28 +03:00
unknown
00c41b2850 Fix to make Windows compilation smoother
VC++Files/innobase/innobase.dsp:
  non-existent file removed
client/mysql.cc:
  local opt_max_allowed_packet and opt_net_buffer_length introduced
client/mysqldump.c:
  local opt_max_allowed_packet and opt_net_buffer_length introduced
include/mysql.h:
  mysql_get_parameters() interface added
  #define max_allowed_packet added
include/mysql_com.h:
  these should not be exported
libmysql/libmysql.c:
  mysql_get_parameters implementations
libmysql/libmysql.def:
  interface changed
libmysql_r/Makefile.am:
  MYSQL_CLIENT define added
libmysqld/lib_sql.cc:
  line moved to be above the '#include "mysql.cc"'
libmysqld/libmysqld.c:
  mysql_get_parameters implementation (embedded)
libmysqld/libmysqld.def:
  interface changed
sql/log_event.cc:
  should be like that in this case
tools/mysqlmanager.c:
  compiler warns on this line
2004-05-26 21:40:27 +05:00
unknown
8a3adca7a1 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.3744


client/mysql.cc:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
2004-05-21 22:00:12 +05:00
unknown
2d67f1e0cf Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
Ensured that all projects compile
Removed compiler warnings
Better setting of server_version variable.
Fix that make_win_src_distribution creates the privilege tables.


VC++Files/bdb/bdb.dsp:
  Small, automatic changes
VC++Files/client/mysql.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/client/mysqladmin.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/client/mysqlclient.dsp:
  Removed files that should only be used with mysql command line client
VC++Files/client/mysqldump.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/client/mysqlimport.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/client/mysqlshow.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/comp_err/comp_err.dsp:
  Automatic changes
VC++Files/dbug/dbug.dsp:
  Automatic changes
VC++Files/heap/heap.dsp:
  automatic changes
VC++Files/innobase/innobase.dsp:
  Automatic changes
VC++Files/isam/isam.dsp:
  Automatic changes
VC++Files/isamchk/isamchk.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/libmysql/libmysql.dsp:
  Automatic changes
VC++Files/libmysqld/examples/test_libmysqld.dsp:
  Add missing files
VC++Files/libmysqld/libmysqld.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/libmysqltest/myTest.dsp:
  Automatic changes
VC++Files/merge/merge.dsp:
  Automatic changes
VC++Files/my_print_defaults/my_print_defaults.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/myisam/myisam.dsp:
  automatic changes
VC++Files/myisam_ftdump/myisam_ftdump.dsp:
  automatic changes
VC++Files/myisamchk/myisamchk.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/myisamlog/myisamlog.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/myisammrg/myisammrg.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/myisampack/myisampack.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/mysql.dsw:
  Automatic changes
VC++Files/mysqlbinlog/mysqlbinlog.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/mysqlcheck/mysqlcheck.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/mysqldemb/mysqldemb.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/mysqlserver/mysqlserver.dsp:
  Automatic changes
VC++Files/mysqlshutdown/mysqlshutdown.dsp:
  Automatic changes
VC++Files/mysqlwatch/mysqlwatch.dsp:
  Automatic changes
VC++Files/mysys/mysys.dsp:
  Automatic changes
VC++Files/pack_isam/pack_isam.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/perror/perror.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/regex/regex.dsp:
  Automatic changes
VC++Files/replace/replace.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/sql/mysqld.dsp:
  Added support for projects 'classic', 'classic nt', 'pro' and 'pro nt'
VC++Files/strings/strings.dsp:
  Removed duplicate code for strnlen
VC++Files/test1/test1.dsp:
  Automatic changes
VC++Files/thr_test/thr_test.dsp:
  Automatic changes
VC++Files/vio/vio.dsp:
  Automatic changes
VC++Files/zlib/contrib/asm386/zlibvc.dsp:
  Automatic changes
VC++Files/zlib/zlib.dsp:
  Automatic changes
extra/my_print_defaults.c:
  Fixed bug in --verbose
include/m_string.h:
  Portability fix
include/mysql_embed.h:
  Better setting of server_version variable
include/mysql_version.h.in:
  Better license text handling
innobase/pars/pars0lex.l:
  Remove compiler warnings
innobase/trx/trx0sys.c:
  Remove compiler warnings
libmysqld/lib_sql.cc:
  Better setting of server_version variable
libmysqld/libmysqld.def:
  Add functions needed for mysql command line client
myisam/myisam_ftdump.c:
  Remove compiler warnings
mysys/sha1.c:
  Remove compiler warnings
scripts/make_win_src_distribution.sh:
  Safety fix
scripts/mysql_install_db.sh:
  Backport from 4.1 to allow make_win_src_distribution create the privilege tables
sql/Makefile.am:
  Add new file mysqld_suffix.h
  Remove not used file sql_olap.h
sql/ha_innodb.cc:
  Remove not used variable
sql/mysqld.cc:
  Better setting of server_version variable
sql/set_var.cc:
  Fixed bug when showing lower_case_file_system
strings/ctype-tis620.c:
  Remove compiler warnings
2004-05-19 16:38:12 +03:00
unknown
afe09e48e0 Proposed fix for #3744 (embedded server, wrong error message if database is
missing)


libmysqld/embedded_priv.h:
  embedded_get_error interface added
libmysqld/lib_sql.cc:
  embedded_get_error implementation/using added
libmysqld/libmysqld.c:
  embedded_get_error call added
2004-05-17 12:05:57 +05:00
unknown
05cd698f54 Fixes for #3371, #3372, #3374, #3375, #3376
libmysql/libmysql.c:
  code to fix #3772
  counting of field->max_length moved to mysql_store_stmt_result so
  it will work in libmysqld also
libmysqld/lib_sql.cc:
  to fix #3771 and #3775
  stmt->affected_rows specifying added
  code getting default values changed so it will add terminating /0 to
  values
sql/sql_parse.cc:
  to fix #3773
  silly mistake here :\
sql/sql_prepare.cc:
  to fix #3774 and #3776
  special function for datetime values in embedded server added
  unsigned flag now specified for values in embedded server
tests/client_test.c:
  this test fails if privilege-checking pars are disabled
  (it's the default for libmysqld)
2004-05-15 17:07:44 +05:00
unknown
7873b89fc5 Fixed many compiler warnings
Fixed bugs in group_concat with ORDER BY and DISTINCT (Bugs #2695, #3381 and #3319)
Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
Set locked_in_memory properly


include/mysql_com.h:
  Fixed compiler warning
libmysqld/emb_qcache.cc:
  Removed not used variable
libmysqld/lib_sql.cc:
  Removed not used variable
myisam/mi_locking.c:
  Added comment
myisam/mi_rnext.c:
  Fixed bug in concurrent insert
myisam/mi_rprev.c:
  Simple optimization
mysql-test/r/func_gconcat.result:
  New tests
mysql-test/t/func_gconcat.test:
  New tests
mysql-test/t/func_group.test:
  Cleanup
sql-common/client.c:
  Removed compiler warning
sql/derror.cc:
  Better comments
sql/field.cc:
  Removed not used function/variable
sql/field.h:
  Removed not needed variable
sql/ha_innodb.cc:
  Removed not used function
sql/item.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_func.cc:
  Fixed compiler warning
sql/item_geofunc.cc:
  Fixed compiler warning
sql/item_sum.cc:
  Fixed bugs in group_concat and added more comments
  (Bugs #2695, #3381 and #3319)
  - field->abs_offset was not needed
  - Wrong assumption of field order in temporary table
  - Some not used variables removed
  - Added ORDER BY fields after argument fields so that code in sql_select.cc can move all fields to point to temporary tables, if needed.
  - Optimized loops
sql/item_sum.h:
  Bug fixing and cleanup of group_concat()
sql/log.cc:
  Removed wrong comment
sql/log_event.cc:
  Removed compiler warning
sql/mysqld.cc:
  Set locked_in_memory properly
sql/protocol.cc:
  Removed compiler warning
sql/set_var.cc:
  Code cleanup
sql/slave.cc:
  Fixed crash when doing rollback in slave and the io thread catched up with the sql thread
sql/sql_cache.cc:
  Removed compiler warnings
sql/sql_derived.cc:
  Removed not used variable
sql/sql_insert.cc:
  Removed compiler warnings
sql/sql_lex.cc:
  Removed not used lable
sql/sql_lex.h:
  Removed compiler warnings
sql/sql_parse.cc:
  Removed compiler warnings
sql/sql_prepare.cc:
  Removed compiler warnings
sql/sql_select.cc:
  Removed not used variables
  Added function comments
sql/sql_show.cc:
  Removed compiler warnings
sql/sql_yacc.yy:
  Fix for ORDER BY handling in GROUP_CONCAT()
2004-04-05 13:56:05 +03:00
unknown
7e5cd91057 Simplification: MYSQL_RES *result replaced with MYSQL_DATA result;
No need to check for result existence any more, store_result functions
now are shorter.
cli_read_binary_rows rewritten to handle MYSQL_DATA directly.


include/mysql.h:
  MYSQL_RES * pointer replaced with MYSQL_DATA: it saves us at least 2 mallocs
  per store_result and simplifies stored result handling.
  Plus it's done with cursor fetch in mind: cursor fetch will use this
  structure to buffer fetched rows.
libmysql/client_settings.h:
  signature of cli_read_binary_rows changed
libmysql/libmysql.c:
  MYSQL_DATA is now used to handle result.
  cli_read_binary_rows rewritten to use MYSQL_DATA directly.
libmysql/libmysql.def:
  declarations of new calls in the library
libmysqld/lib_sql.cc:
  MYSQL_DATA is now used to handle result.
  cli_read_binary_rows rewritten to use MYSQL_DATA directly.
2004-03-28 17:22:04 +04:00
unknown
8b0d52ab12 Small fix to embedded library
we should call check_user in NO_EMBEDDED_ACCESS_CHECKS case
to do necessary initializations


libmysqld/lib_sql.cc:
  call of check_user added
2004-03-27 15:27:36 +04:00
unknown
5b624042b8 Removed compiler warning
Changed _XXX to _MY_XXX to solve conflict problem on Mac OS X


include/m_ctype.h:
  Changed _XXX to _MY_XXX to solve conflict problem on Mac OS X
include/mysql.h:
  Removed compiler warning
libmysqld/lib_sql.cc:
  Removed compiler warning
mysys/charset2html.c:
  Changed _XXX to _MY_XXX to solve conflict problem on Mac OS X
regex/regcomp.c:
  Changed _XXX to _MY_XXX to solve conflict problem on Mac OS X
sql-common/client.c:
  Indentation fix
2004-03-18 14:53:38 +02:00
unknown
dc59dffee7 Fix for #1325
We just tried to open binlog's file twice in embedded server


libmysqld/lib_sql.cc:
  Second opening of the log removed
2004-03-13 20:11:41 +04:00
unknown
188535bba0 Rename:
read_statistic -> read_statistics
(statistic is adjective)


include/mysql.h:
  read_statistic -> read_statistics
libmysql/client_settings.h:
  read_statistic -> read_statistics
libmysql/libmysql.c:
  read_statistic -> read_statistics
libmysqld/lib_sql.cc:
  read_statistic -> read_statistics
sql-common/client.c:
  read_statistic -> read_statistics
2004-03-10 20:12:24 +03:00
unknown
8286684e26 Cleanup ha_checktype() and redundant variables.
libmysqld/lib_sql.cc:
  Removing *_skip variables
sql/ha_berkeley.cc:
  Removing *_skip variables
sql/ha_berkeley.h:
  Removing *_skip variables
sql/ha_innodb.cc:
  Removing *_skip variables
sql/ha_innodb.h:
  Removing *_skip variables
sql/ha_isam.cc:
  Removing *_skip variables
sql/ha_isam.h:
  Removing *_skip variables
sql/handler.cc:
  Removing *_skip variables
  Cleanup ha_checktype()
sql/mysqld.cc:
  Removing *_skip variables
sql/sql_show.cc:
  Removing *_skip variables
2004-03-02 10:08:50 +00:00
unknown
709356d473 Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE


include/m_ctype.h:
  Changed wellformedlen to well_formed_len
include/mysql.h:
  Fixed comment
libmysql/libmysql.c:
  Fixed indentation
libmysqld/lib_sql.cc:
  Fixed indentation
mysql-test/r/ctype_utf8.result:
  updated warning numbers
mysql-test/r/innodb.result:
  Moved test to right place
mysql-test/r/myisam-blob.result:
  More test for blobs
mysql-test/r/rpl000002.result:
  Move test to better place
mysql-test/r/rpl_log.result:
  Move test to better place
mysql-test/r/union.result:
  Move test to better place
mysql-test/t/innodb.test:
  Moved test to right place
mysql-test/t/myisam-blob.test:
  More test of blobs
mysql-test/t/rpl000002.test:
  Move test to better place
mysql-test/t/rpl_log.test:
  Move test to better place
mysql-test/t/union.test:
  Move test to better place
sql/field.cc:
  Changed wellformedlen to well_formed_len.
  Fixed that blobs >16M can be inserted/updated (new bug)
sql/field.h:
  Code optimization
sql/sql_lex.cc:
  Changed short variable names
sql/sql_show.cc:
  Optimized quote handling
sql/sql_table.cc:
  Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
sql/sql_union.cc:
  Added comment
strings/ctype-big5.c:
  Changed wellformedlen to well_formed_len
strings/ctype-bin.c:
  Changed wellformedlen to well_formed_len
strings/ctype-euc_kr.c:
  Changed wellformedlen to well_formed_len
strings/ctype-gb2312.c:
  Changed wellformedlen to well_formed_len
strings/ctype-gbk.c:
  Changed wellformedlen to well_formed_len
strings/ctype-latin1.c:
  Changed wellformedlen to well_formed_len
strings/ctype-mb.c:
  Changed wellformedlen to well_formed_len
strings/ctype-simple.c:
  Changed wellformedlen to well_formed_len
strings/ctype-sjis.c:
  Changed wellformedlen to well_formed_len
strings/ctype-tis620.c:
  Changed wellformedlen to well_formed_len
strings/ctype-ucs2.c:
  Changed wellformedlen to well_formed_len
  Indentation changes
strings/ctype-ujis.c:
  Changed wellformedlen to well_formed_len
strings/ctype-utf8.c:
  Changed wellformedlen to well_formed_len
2004-02-17 01:35:17 +02:00
unknown
b012018b7a Fix for #2212 (mysql_change_user doesn't work in embedded library)
now it's working


include/mysql.h:
  read_change_user_result 'virtual' method added
libmysql/client_settings.h:
  cli_read_change_user_result interface
libmysql/libmysql.c:
  cli_read_change_user_result implementation
libmysqld/lib_sql.cc:
  emb_read_change_user_result implementation
sql-common/client.c:
  cli_read_change_user_result added to the method's table
sql/sql_parse.cc:
  fixes to make mysql_change_user working in embedded library
2004-02-14 20:26:21 +04:00
unknown
bb625fbc6d Fix for #2211 (field->def contains invalid values)
libmysqld/lib_sql.cc:
  not the right variable was used
2004-02-13 17:20:56 +04:00
unknown
f2adc11249 Another fix for #2208
previous one had error


libmysqld/lib_sql.cc:
  memdup_mysql deleted
sql/sql_class.h:
  String instead of char*
sql/sql_parse.cc:
  storing of the rest of the query
2004-02-13 11:56:36 +04:00
unknown
eea7cbfba5 Fix for #1438 (mysql_info always returns 0)
libmysqld/lib_sql.cc:
  mysql.info set to the right value
2004-02-12 16:47:57 +04:00
unknown
b4fc7c7fbf Fix for #2208 (multi-query returns wrong result in embedded library)
now we execute only one first select during mysql_real_query
others - during 'mysql_next_result'


include/mysql.h:
  'virtual' next_result added
libmysql/client_settings.h:
  cli_next_result declaration added
libmysql/libmysql.c:
  mysql_next_result now works in embedded library as well
libmysqld/lib_sql.cc:
  emb_next_result implemented
sql/sql_class.h:
  fields to store the rest of the query added
sql/sql_parse.cc:
  Saving the rest of the query added for embedded case
2004-02-10 17:09:59 +04:00
unknown
2746e7de02 Fix for #2209
mysql->server_status wasn't set after the query


libmysqld/lib_sql.cc:
  Server status assignement added
2004-01-27 16:51:11 +04:00
unknown
58e442caf3 bugfix to #1224
code slightly modified with Monty's suggestions


libmysqld/lib_sql.cc:
  copying of pointers replaced with my_strdup()-s
sql/sql_class.cc:
  this code should work anyway now
2004-01-27 13:46:47 +04:00
unknown
582886a3e9 Fix for 1224 (USER() CURRENT_USER() functions in embedded library)
Now we return user@host for USER() in embedded library
CURRENT_USER returns empty string if library compiled with
NO_EMBEDDED_ACCESS_CHECKS


libmysqld/embedded_priv.h:
  function's declarations trimmed
libmysqld/lib_sql.cc:
  user/host names handling added
libmysqld/libmysqld.c:
  user/host names handling added
sql/sql_class.cc:
  we shouldn't free user/host names in embedded library
2004-01-07 21:30:15 +04:00
unknown
690404bdc8 Merge
libmysqld/lib_sql.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_parse.cc:
  SCCS merged
2004-01-07 12:54:28 +04:00
unknown
32c6b0d72a Prepared_statement deployed instead of PREP_STMT.
libmysqld/lib_sql.cc:
  Prepared_statement now resides entirely in sql_prepare.cc
  Embedded versions of setup_params_data moved to sql_prepare.cc
sql/mysql_priv.h:
  removed declarations for non-existing functions
sql/slave.cc:
  no thd->init_for_queries() any more
sql/sql_class.cc:
  added Statement and Statement_map classes.
  PREP_STMT replaced with Statement (Prepared_statement) and moved to
  sql_prepare.cc
sql/sql_class.h:
  added Statement and Statement_map classes.
  PREP_STMT replaced with Statement (Prepared_statement) and moved to
  sql_prepare.cc
sql/sql_parse.cc:
  thd->init_for_queries() doesn't exist any more
  comment moved to proper place
sql/sql_prepare.cc:
  PREP_STMT replaced with Prepared_statement
  minor code cleanups
tests/client_test.c:
  Later in the test we rely on order of rows, which normally is not defined.
  My patch changes the order.
2003-12-20 02:16:10 +03:00