Commit graph

1563 commits

Author SHA1 Message Date
Sergey Glukhov
3b617acb87 Bug#41131 "Questions" fails to increment - ignores statements instead stored procs(5.0 ver)
Added global status variable 'Queries' which represents
total amount of queries executed by server including
statements executed by SPs.
note: It's old behaviour of 'Questions' variable.


mysql-test/r/status.result:
  test result
mysql-test/t/status.test:
  test case
sql/mysqld.cc:
  Added global status variable 'Queries' which represents
  total amount of queries executed by server including
  statements executed by SPs.
  note: It's old behaviour of 'Questions' variable.
sql/sql_show.cc:
  Added global status variable 'Queries' which represents
  total amount of queries executed by server including
  statements executed by SPs.
  note: It's old behaviour of 'Questions' variable.
sql/structs.h:
  Added global status variable 'Queries' which represents
  total amount of queries executed by server including
  statements executed by SPs.
  note: It's old behaviour of 'Questions' variable.
2008-12-29 16:06:53 +04:00
Sergey Glukhov
4794f463b6 compiler warning fix 2008-12-24 18:45:47 +04:00
Sergey Glukhov
c06df92af6 Bug#37575 UCASE fails on monthname
The MONTHNAME/DAYNAME functions
returns binary string, so the LOWER/UPPER functions
are not effective on the result of MONTHNAME/DAYNAME call.  
Character set of the MONTHNAME/DAYNAME function
result has been changed to connection character set.


include/m_ctype.h:
  added my_charset_repertoire function
mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/func_time.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/func_time.test:
  test case
sql/item_timefunc.cc:
  Item_func_monthname::fix_length_and_dec and
  Item_func_dayname::fix_length_and_dec methods have been
  modified to use connection character set
sql/item_timefunc.h:
  Item_func_monthname::fix_length_and_dec and
  Item_func_dayname::fix_length_and_dec methods have been
  modified to use connection character set
sql/mysql_priv.h:
  added max_month_name_length, max_day_name_length fields into MY_LOCALE struct
sql/mysqld.cc:
  The test_lc_time_sz function controls modifications
  of the locale database in debugging mode.
sql/sql_locale.cc:
  initialization of max_month_name_length, max_day_name_length fields
strings/ctype.c:
  added my_charset_repertoire function
2008-12-23 18:08:04 +04:00
Georgi Kodinov
f1a9d567c1 merged bug 37339 to 5.0-bugteam 2008-11-28 16:32:04 +02:00
Georgi Kodinov
8e688a7a02 Bug #37339: SHOW VARIABLES not working properly with multi-byte datadir
The SHOW VARIABLES LIKE .../SELECT @@/SELECT ... FROM INFORMATION_SCHEMA.VARIABLES
were assuming that all the system variables are in system charset (UTF-8).
However the variables that are settable through command line will have a different
character set (character_set_filesystem).
Fixed the server to remember the correct character set of basedir, datadir, tmpdir,
ssl, plugin_dir, slave_load_tmpdir, innodb variables; init_connect and init_slave 
variables and use it when processing data.

mysql-test/r/ctype_filesystem.result:
  Bug #37339: test case (should be in utf-8)
mysql-test/t/ctype_filesystem-master.opt:
  Bug #37339: test case (should be in ISO-8859-1)
mysql-test/t/ctype_filesystem.test:
  Bug #37339: test case
sql/mysqld.cc:
  Bug #37339: remember the correct character set for init_slave and init_connect
sql/set_var.cc:
  Bug #37339: 
    - remember the character set of the relevant variables
    - implement storing and using the correct 
      character set
sql/set_var.h:
  Bug #37339: implement storing and using the correct 
  character set
sql/sql_show.cc:
  Bug #37339: implement storing and using the correct 
  character set
2008-11-28 16:25:16 +02:00
Vladislav Vaintroub
f2a610e1e0 Bug #20430 mysqld.exe windows service stuck in "SERVICE_STOP_PENDING"
status

The problem appears to be a race condition, when service is being
stopped right after startup. We set the service status to SERVICE_RUNNING
way too early it cannot yet handle stop requests -  initialization has
not finished and  hEventShutdown  that signals server to stop is not yet
created. If somebody issues "net stop MySQL" at this time, MySQL is not
informed about the stop and continues to run as usual, while
NTService::ServiceMain() stucks forever waiting for mysql's "main" thread
to finish.

Solution is to remain in SERVICE_START_PENDING status until after server
initialization  is fully complete and only then change the status to
SERVICE_RUNNING. In  SERVICE_START_PENDING we do not accept service control
requests, i.e it is not possible to stop service in that time.

sql/mysqld.cc:
  Set service status to running after all initialization is complete
sql/nt_servc.cc:
  New method SetRunning() to be called  by application
  to set service status to SERVICE_RUNNING when apllication
  has finished initialization.
sql/nt_servc.h:
  New method SetRunning() to be called  by application
  when initialization completes
2008-11-14 02:01:41 +01:00
Kristofer Pettersson
f985e78775 Bug#24289 Status Variable "Questions" gets wrong values with Stored Routines
When running Stored Routines the Status Variable "Questions" was wrongly
incremented. According to the manual it should contain the "number of
statements that clients have sent to the server"
              
Introduced a new status variable 'questions' to replace the query_id
variable which currently corresponds badly with the number of statements
sent by the client.
            
The new behavior is ment to be backward compatible with 4.0 and at the
same time work with new features in a similar way.
            
This is a backport from 6.0

mysql-test/r/status2.result:
  Added test case
mysql-test/t/status2.test:
  Added test case
sql/mysqld.cc:
  Introduced a new status variable 'questions' to replace the query_id
  variable which currently corresponds badly with the number of statements
  sent by the client.
sql/sql_class.h:
  Introduced a new status variable 'questions' to replace the query_id
  variable which currently corresponds badly with the number of statements
  sent by the client.
sql/sql_parse.cc:
  To be backward compatible with 4.0 and at the same time extend the 
  interpretation of the Question variable, it should be increased on
  all COM-commands but COM_STATISTICS, COM_PING, COM_STMT_PREPARE,
  COM_STMT_CLOSE and COM_STMT_RESET.
  Since COM_QUERY can process multiple statements, there has to be an
  extra increase there as well.
sql/sql_show.cc:
  Removed deprecated SHOW_QUESTION status code.
sql/structs.h:
  Removed deprecated SHOW_QUESTION status code.
2008-10-09 09:26:42 +02:00
Alexey Botchkov
8d3eb141e0 merging fix 2008-08-26 13:32:43 +05:00
Sergey Glukhov
c546559a62 Bug#37428 Potential security issue with UDFs - linux shellcode execution.
plugin_dir option backported from 5.1

mysql-test/r/udf.result:
  result fix
sql/mysql_priv.h:
  opt_plugin_dir and opt_plugin_dir_ptr declared.
sql/mysqld.cc:
  'plugin_dir' option added
sql/set_var.cc:
  'plugin_dir' option added.
sql/sql_udf.cc:
  opt_plugin_dir added to the udf->dl path. Warn if it's not specified.
sql/unireg.h:
  PLUGINDIR defined.
2008-08-25 17:11:59 +05:00
Alexey Botchkov
ec524d50a8 Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
test_if_data_home_dir fixed to look into real path.
            Checks added to mi_open for symlinks into data home directory.

per-file messages:
        include/my_sys.h
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          my_is_symlink interface added
        include/myisam.h
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          myisam_test_invalid_symlink interface added
        myisam/mi_check.c
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          mi_open_datafile calls modified
        myisam/mi_open.c
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          code added to mi_open to check for symlinks into data home directory.
          mi_open_datafile now accepts 'original' file path to check if it's
          an allowed symlink.
        myisam/mi_static.c
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          myisam_test_invlaid_symlink defined
        myisam/myisamchk.c
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          mi_open_datafile call modified
        myisam/myisamdef.h
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          mi_open_datafile interface modified - 'real_path' parameter added
        mysql-test/r/symlink.test
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          error codes corrected as some patch now rejected pointing inside datahome
        mysql-test/r/symlink.result
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          error messages corrected in the result
        mysys/my_symlink.c
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          my_is_symlink() implementsd
          my_realpath() now returns the 'realpath' even if a file isn't a symlink
        sql/mysql_priv.h
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          test_if_data_home_dir interface
        sql/mysqld.cc
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          myisam_test_invalid_symlik set with the 'test_if_data_home_dir'
        sql/sql_parse.cc
          Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY.
          
          error messages corrected
          test_if_data_home_dir code fixed
2008-08-22 17:31:53 +05:00
Georgi Kodinov
da4cfa6d1e Bug#37069 (5.0): implement --skip-federated
mysql-test/r/federated_disabled.result:
  Bug#37069 (5.0): test case
mysql-test/t/federated_disabled-master.opt:
  Bug#37069 (5.0): test case
mysql-test/t/federated_disabled.test:
  Bug#37069 (5.0): test case
2008-06-03 13:12:37 +03:00
unknown
8ae5aa3bd8 fixes for warnings and compile errors for the fix of bug 26243 2008-03-29 16:12:23 +02: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
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
fa9e35b48d after merge fix 2008-02-29 15:04:00 +04:00
unknown
8bdb243fd7 Merge mysql.com:/home/gluh/MySQL/Merge/4.1-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/mysql_priv.h:
  Auto merged
mysql-test/r/symlink.result:
  manual merge
mysql-test/t/symlink.test:
  manual merge
sql/mysqld.cc:
  manual merge
sql/sql_parse.cc:
  manual merge
2008-02-29 14:05:38 +04:00
unknown
ab60425901 Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0)
added new function test_if_data_home_dir() which checks that
path does not contain mysql data home directory.
Using of mysql data home directory in
DATA DIRECTORY & INDEX DIRECTORY is disallowed.


mysql-test/r/symlink.result:
  test result
mysql-test/t/symlink.test:
  test case
sql/mysql_priv.h:
  new variable mysql_unpacked_real_data_home
sql/mysqld.cc:
  new variable mysql_unpacked_real_data_home
sql/sql_parse.cc:
  added new function test_if_data_home_dir() which checks that
  path does not contain mysql data home directory.
  Using of mysql data home directory in
  DATA DIRECTORY & INDEX DIRECTORY is disallowed.
2008-02-29 13:55:00 +04:00
unknown
721d24124f Bug#31745 - crash handler does not work on Windows
- Replace per-thread signal()'s with  SetUnhandledExceptionFilter(). 
  The only remaining signal() is for SIGABRT (default abort()
  handler in VS2005 is broken, i.e removes user exception filter)
- remove MessageBox()'es  from error handling code
- Windows port for print_stacktrace() and write_core() 
- Cleanup, removed some unused functions


sql/CMakeLists.txt:
  Implement stack tracing on and generating crash dumps on Windows
sql/mysqld.cc:
  Correct signal handling on Windows. 
  - For console events, like CTRL-C use SetConsoleCtrlHandler
  - For exceptions like access violation, use SetUnhandledExceptionFilter
  - For SIGABRT generate exception via __debugbreak() intrinsic
    if built with VS2005 and later , since default SIGABRT handler 
    replaces unhandled exception filter specified by user
  - make provisions to debug exception filter, as it is not trivial 
  (should be compiled with /DDEBUG_UNHANDLED_EXCEPTION_FILTER)
sql/sql_parse.cc:
  Remove message box from windows signal handler.
  The only thread specific handler left is for SIGABRT,
  which is broken on VS2005 and later (user specified unhandled exception 
  filter gets overwritten)
sql/stacktrace.c:
  Stack tracing and generating crash dumps on Windows
sql/stacktrace.h:
  Implement print_stacktrace and write_core on Windows
2008-02-19 12:37:39 +01:00
unknown
47065ad525 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/tnurnberg/21567/50-21567


sql/mysqld.cc:
  Auto merged
2008-02-10 16:54:41 +01:00
unknown
5cf3f53e42 Fixed bug#34223: Failure on assignment to my_innodb_autoextend_increment
and my_innodb_commit_concurrency global variables.

Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.



mysql-test/r/variables.result:
  Added test case for bug#34223.
mysql-test/t/variables.test:
  Added test case for bug#34223.
sql/mysqld.cc:
  Fixed bug#34223.
  Last update of the getopt_ull_limit_value function introduced
  a sanity check for a variable type (only GET_UINT or GET_ULONG
  are valid types).
  However, my_innodb_autoextend_increment and
  my_innodb_commit_concurrency are declared as GET_LONG.
  Call stack is: 
          sys_var_long_ptr_global::update()
          fix_unsigned()
          getopt_ull_limit_value()
  
  Type of the my_innodb_autoextend_increment and the
  my_innodb_commit_concurrency variables has been changed to
  GET_ULONG.
2008-02-07 04:14:50 +04:00
unknown
86a454ed36 Bug#21567: mysqld doesn't react to Ctrl-C when run under GDB even with the --gdb option
Don't block SIGINT (Control-C) when --gdb is passed to mysqld.
Was broken at least on OS X.

(kudos to Mattias Jonsson)


sql/mysqld.cc:
  Don't block SIGINT when TEST_SIGINT (--gdb) is used, even if
  thr_kill_signal is some other signal (SIGUSR2) and
  pthread_sigmask() in signal_hand() isn't good enough.
2008-02-05 12:56:49 +01:00
unknown
e8406d14b4 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge


sql/mysqld.cc:
  Auto merged
2007-12-14 06:53:55 +01:00
unknown
33f82b1789 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_misc.result:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/func_misc.test:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
sql/sql_insert.cc:
  manual merge
2007-12-13 14:52:49 +04:00
unknown
4c6e70ccf9 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-10 10:31:51 +01:00
unknown
bfe58b71f2 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-06 08:46:01 +01:00
unknown
4618d68d6d Bug#31177: Server variables can't be set to their current values
additional fixes for BDB and correct assignment of both signed
and unsigned 64-bit data to unsigned system variables


mysql-test/r/ps_2myisam.result:
  account for UNSIGNED_FLAG
mysql-test/r/ps_3innodb.result:
  account for UNSIGNED_FLAG
mysql-test/r/ps_4heap.result:
  account for UNSIGNED_FLAG
mysql-test/r/ps_5merge.result:
  account for UNSIGNED_FLAG
mysql-test/r/ps_6bdb.result:
  account for UNSIGNED_FLAG
mysql-test/r/ps_7ndb.result:
  account for UNSIGNED_FLAG
mysys/my_getopt.c:
  We have correct signed/unsigned information now, so we no longer
  need to err on the side of caution.
sql/item_func.cc:
  Copy unsigned info over from entry so the item's data
  correctly describe it.
sql/mysqld.cc:
  BDB log buffer size: default can't be less than minimum
sql/set_var.cc:
  Handle signedness of in-values correctly when assigning to
  unsigned types, all the way up to 64-bit. Use handler from
  all three unsigned sysvar types.
sql/set_var.h:
  thd_ulonglong: Override default check with one for unsigned types
2007-12-06 01:28:01 +01:00
unknown
6a72267d05 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177


client/mysql.cc:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_bit.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-12-02 01:48:43 +01:00
unknown
4100e3e4c2 Merge mysql.com:/home/hf/work/mrg/my41-mrg
into  mysql.com:/home/hf/work/mrg/my50-mrg


include/mysql_com.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-11-30 22:29:34 +04:00
unknown
89a208850a Bug#31177: Server variables can't be set to their current values
Default values of variables were not subject to upper/lower bounds
and step, while setting variables was. Bounds and step are also
applied to defaults now; defaults are corrected quietly, values
given by the user are corrected, and a correction-warning is thrown
as needed. Lastly, very large values could wrap around, starting
from 0 again. They are bounded at the maximum value for the
respective data-type now if no lower maximum is specified in the
variable's definition.


client/mysql.cc:
  correct maxima in options array
client/mysqltest.c:
  adjust minimum for "sleep" option so default value is no longer
  out of bounds.
include/m_string.h:
  ullstr() - the unsigned brother of llstr()
include/my_getopt.h:
  Flag if we bounded the value (that is, correct anything aside from
  making value a multiple of block-size)
mysql-test/r/delayed.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/index_merge.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/innodb_mysql.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/key_cache.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/packet.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/ps.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/subselect.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/type_bit_innodb.result:
  We throw a warning now when we adjust out of range parameters.
mysql-test/r/variables.result:
  correct results: bounds and step apply to variables' default values, too
mysql-test/t/variables.test:
  correct results: bounds and step apply to variables' default values, too
mysys/my_getopt.c:
  - apply bounds/step to default values of variables (based on work by serg)
  - print complaints about incorrect values for variables (truncation etc.,
    by requestion of consulting)
  - if no lower maximum is specified in variable definition, bound unsigned
    values at their maximum to prevent wrap-around
  - some calls to error_reporter had a \n, some didn't. remove \n from calls,
    let reporter-function handle it, so the default reporter behaves like that
    in mysqld
sql/mysql_priv.h:
  correct RANGE_ALLOC_BLOCK_SIZE (cleared with monty)
sql/mysqld.cc:
  correct maxima to correct data-type.
  correct minima where higher than default.
  correct range-alloc-block-size.
  correct inno variables so GET_* corresponds to actual variable's type.
sql/set_var.cc:
  When the new value for a variable is out of bounds, we'll send the
  client a warning (but not if the value was simply not a multiple of
  'blocksize').  sys_var_thd_ulong had this, sys_var_long_ptr_global
  didn't; broken out and streamlined to avoid duplication of code.
strings/llstr.c:
  ullstr() - the unsigned brother of llstr()
2007-11-30 06:32:04 +01:00
unknown
23e402bf45 Bug #29085 A small double precision number becomes zero.
Denormalized DOUBLE-s can't be properly handled by old MIPS processors.
So we need to enable specific mode for them so IRIX will do use
software round to handle such numbers. 


sql/mysqld.cc:
  Bug #29085 A small double precision number becomes zero.
  
  reset_floating_point_exeption() renamed as set_proper_floating_point_mode()
  #ifdef __sgi code added to enable denormalized DOUBLE-s on IRIX
2007-11-29 14:52:36 +04:00
unknown
77ab800e77 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge


sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2007-11-27 08:56:43 -07:00
unknown
a11256f49a Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge


sql/mysqld.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-11-21 18:35:02 -07:00
unknown
d295bfaa76 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-11-21 21:11:57 +01:00
unknown
1ae0237f24 Merge adventure.(none):/home/thek/Development/cpp/bug31153/my50-bug31153
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime


sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_yacc.yy:
  Manual merge.
2007-11-21 10:02:44 +01:00
unknown
bb681dbc88 Bug #31153 calling stored procedure crashes server if available memory is low
When the server was out of memory it crashed because of invalid memory access.

This patch adds detection for failed memory allocations and make the server
output a proper error message.


sql/mysqld.cc:
  Don't try to push_warning from within push_warning. It will cause a recursion
  until the stack is consumed.
  
  If my_net_init fails (for example: because of OOM) the temporary vio object 
  might have been attached to the thd object already. This will cause a double
  free on the vio object when the thd object is deleted later on and the server
  will crash.
sql/sp_head.cc:
  Added check for out-of-memory on a 'new' operation.
  Refactored reset_lex method to return a error state code instead of void.
  Initialize the mem-root with init_sql_alloc to get a basic error handler for
  memory allocation problems. This alone won't prevent the server from crashing,
  NULL pointers have to be accounted for as well.
sql/sp_head.h:
  Use the throw() clause in operator new, to indicate to the compiler that
  memory allocation can fail and return NULL, so that the compiler should
  generate code to check for NULL before invoking C++ constructors, to be
  crash safe.
sql/sql_base.cc:
  Use init_sql_alloc to get basic out-of-memory error handling.
sql/sql_lex.h:
  Use the throw() clause in operator new, to indicate to the compiler that
  memory allocation can fail and return NULL, so that the compiler should
  generate code to check for NULL before invoking C++ constructors, to be
  crash safe.
sql/sql_prepare.cc:
  Use init_sql_alloc to get basic out-of-memory error handling.
sql/sql_yacc.yy:
  Check for memory allocation failures where it matters.
2007-11-19 17:59:44 +01:00
unknown
f7ee88253a ha_ndbcluster.h:
Bug #31956       auto increment bugs in MySQL Cluster: Added utility method and constant for internal prefetch default
ndb_auto_increment.result:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/r/ndb_auto_increment.result
mysqld.cc:
  Bug #25176  	Trying to set ndb_autoincrement_prefetch_sz always fails: Changed pointer to max value
  Bug #31956  	auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement)
ndb_insert.test, ndb_insert.result:
  Moved auto_increment tests to ndb_auto_increment.test
ndb_auto_increment.test:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/t/ndb_auto_increment.test
ha_ndbcluster.cc:
  Bug #31956       auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement), added handling of updates of pk/unique key with auto_increment
  Bug #32055  	Cluster does not handle auto inc correctly with insert ignore statement


sql/mysqld.cc:
  Bug #25176  	Trying to set ndb_autoincrement_prefetch_sz always fails: Changed pointer to max value
  Bug #31956  	auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement)
sql/ha_ndbcluster.h:
  Bug #31956       auto increment bugs in MySQL Cluster: Added utility method and constant for internal prefetch default
sql/ha_ndbcluster.cc:
  Bug #31956       auto increment bugs in MySQL Cluster: Changed meaning of ndb_autoincrement_prefetch_sz to specify prefetch between statements, changed default to 1 (with internal prefetch to at least 32 inside a statement), added handling of updates of pk/unique key with auto_increment
  Bug #32055  	Cluster does not handle auto inc correctly with insert ignore statement
mysql-test/r/ndb_auto_increment.result:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/r/ndb_auto_increment.result
mysql-test/t/ndb_auto_increment.test:
  BitKeeper file /home/marty/MySQL/mysql-5.0-ndb/mysql-test/t/ndb_auto_increment.test
mysql-test/t/ndb_insert.test:
  Moved auto_increment tests to ndb_auto_increment.test
mysql-test/r/ndb_insert.result:
  Moved auto_increment tests to ndb_auto_increment.test
2007-11-05 20:18:22 +01:00
unknown
25939026a7 Fixed compile warnings introduced by the patch for bug #29131. 2007-10-29 11:52:44 +03:00
unknown
b52ab3bda5 Merge polly.(none):/home/kaa/src/opt/bug29131/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-29 10:25:48 +03:00
unknown
6eced1b857 Fix for bug #29131: SHOW VARIABLES reports variable 'log' but SET
doesn't recognize it

This is a 5.0 version of the patch, it will be null-merged to 5.1

Problem:

'log' and 'log_slow_queries' were "fixed" variables, i.e. they showed up
in SHOW VARIABLES, but could not be used in expressions like 
"select @@log". Also, using them in the SET statement produced an 
incorrect "unknown system variable" error.

Solution:

Make 'log' and 'log_slow_queries' read-only dynamic variables to make 
them available for use in expressions, and produce a correct error 
about the variable being read-only when used in the SET statement.


mysql-test/r/variables.result:
  Added a test case for bug #29131.
mysql-test/t/variables.test:
  Added a test case for bug #29131.
sql/mysql_priv.h:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/mysqld.cc:
  Changed the type of opt_log and opt_slow_log to my_bool to 
  align with the interfaces in set_var.cc
sql/set_var.cc:
  Made 'log' and 'log_slow_queries' to be read-only dynamic system 
  variable, i.e. available for use in expressions with the @@var syntax.
sql/set_var.h:
  Added a new system variable class representing a read-only boolean
  variable.
2007-10-25 14:02:27 +04:00
unknown
9be2220bfd Merge mysql.com:/home/bar/mysql-work/mysql-5.0
into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl-mr


client/mysql.cc:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
2007-10-24 10:49:46 +05:00
unknown
0d128c0746 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30821/50-30821


sql/mysqld.cc:
  Auto merged
2007-10-12 11:30:53 +02:00
unknown
c83bff9915 Bug#30821: setting --tc_heuristic_recover tries to set myisam_stats_method
Options to mysqld were not processed correctly because switch statement
was missing some "break"s. CS adds them.

No test case; would require .opt file and server restart. Manually tested.


sql/mysqld.cc:
  Add missing "break"s to switch() in mysqld to fix option processing.
2007-10-12 11:23:45 +02:00
unknown
ad8ca7b3b4 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/mysqld.cc:
  Auto merged
2007-10-09 13:49:58 -06:00
unknown
6f2c2dc8e8 Change URLs.
Our web server has been restructured several times, and references
to it in our source code has stayed the same.  This patch from Paul
DuBois updates all URLs to modern semantics.


debian/po/ca.po:
  Change URLs.
debian/po/cs.po:
  Change URLs.
debian/po/da.po:
  Change URLs.
debian/po/gl.po:
  Change URLs.
debian/po/ja.po:
  Change URLs.
debian/po/pt_BR.po:
  Change URLs.
debian/po/sv.po:
  Change URLs.
debian/po/tr.po:
  Change URLs.
mysql-test/lib/mtr_report.pl:
  Change URLs.
mysql-test/mysql-test-run-shell.sh:
  Change URLs.
ndb/include/ndbapi/Ndb.hpp:
  Change URLs.
netware/mysql_test_run.c:
  Change URLs.
scripts/mysqld_safe.sh:
  Change URLs.
sql/mysqld.cc:
  Change URLs.
2007-10-05 13:16:54 -04:00
unknown
c038fe2d92 Merge sita.local:/Users/tsmith/m/bk/50-5.0.48
into  sita.local:/Users/tsmith/m/bk/maint/50


sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
2007-10-04 13:58:40 -06:00
unknown
61c8e6ca16 Bug #20358: InnoDB hang on the adaptive hash index latch in btr0sea.c
Add --skip-innodb-adaptive-hash-index option, which is a way to
work around the bug (by disabling the adaptive hash feature entirely).

This may be useful even once the bug is fixed, for benchmarking purposes.
There are some workloads for which the adaptive hash index is not effective.


sql/ha_innodb.cc:
  Add --skip-innodb-adaptive-hash-index option.
sql/ha_innodb.h:
  Add --skip-innodb-adaptive-hash-index option.
sql/mysqld.cc:
  Add --skip-innodb-adaptive-hash-index option.
sql/set_var.cc:
  Add --skip-innodb-adaptive-hash-index option.
2007-10-02 23:47:30 -06:00
unknown
c359f7ff33 Bug#29675 collation_connection is defined twice for the same value
Removing redundant initialization.


sql/mysqld.cc:
  Removing redundant variable initialization.
2007-10-02 15:20:45 +05:00
unknown
bc8d42f96d Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731
into  polly.(none):/home/kaa/src/maint/mysql-5.0-maint


sql/mysqld.cc:
  Auto merged
2007-10-02 13:34:33 +04:00
unknown
2b8748ca6e Merge polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731_buffer_limits
into  polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731


sql/mysqld.cc:
  Auto merged
2007-10-02 12:41:08 +04:00
unknown
05055a45b3 Merge polly.(none):/home/kaa/src/maint/bug5731.old/my50-bug5731-read_buffer_size
into  polly.(none):/home/kaa/src/maint/bug5731/my50-bug5731


include/my_global.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2007-10-02 11:18:00 +04:00