Commit graph

7441 commits

Author SHA1 Message Date
unknown
417d2b193a Add cast to remove compiler warning 2003-12-10 12:03:54 +02:00
unknown
39177af1f3 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/kostja/mysql/mysql-4.0-1335
2003-12-10 01:15:31 +03:00
unknown
b0a9299efe bug #1335 tests followup:
--disable_query_log was not a good idea, Serg says


mysql-test/r/group_by.result:
  bug #1335 tests followup:
  --disable_query_log was not a good idea, Serg says
  tests results updated
2003-12-10 01:08:10 +03:00
unknown
c8fbf887bc Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/my/mysql-4.0
2003-12-10 00:01:01 +02:00
unknown
6b97c26a29 Added checking of return value from my_once_alloc() in charset
Added checking of return value from malloc() in reg_init()


client/mysqltest.c:
  Added comment
dbug/dbug.c:
  Removed not needed test
mysys/charset.c:
  Added checking of return value from my_once_alloc()
regex/reginit.c:
  Abort if out of memory in reg_init() (unlikely)
sql/item_strfunc.cc:
  Added comment
2003-12-10 00:00:20 +02:00
unknown
870ec769f1 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.0
2003-12-09 22:56:31 +02:00
unknown
daccd19657 followup 2003-12-09 21:56:11 +01:00
unknown
1c30ec0970 Fix for bug #1335: filesort is missing in EXPLAIN if ORDER BY NULL is used
mysql-test/r/group_by.result:
  test results fixed
mysql-test/t/group_by.test:
  added few explicit tests for bug #1335
2003-12-09 23:52:58 +03:00
unknown
ab3152cfca Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.0
2003-12-09 22:34:23 +02:00
unknown
6f1d63bfe0 Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0


sql/mysqld.cc:
  Auto merged
2003-12-09 20:50:11 +01:00
unknown
7cfbf9e8f6 code cleanup after some reasoning
sql/mysqld.cc:
  code cleanup
2003-12-09 20:49:48 +01:00
unknown
4e85bf326e Add newline after pid in pidfile 2003-12-09 20:17:28 +02:00
unknown
610fe7ae77 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/my/mysql-4.0


sql/mysqld.cc:
  Auto merged
2003-12-09 16:21:43 +02:00
unknown
589657539c Don't limit number of tables in table cache 2003-12-09 16:21:23 +02:00
unknown
7b3d8cc93f Fix for the bugs:
#2005 Long decimal comparion bug.                                               
#2055 mysqldump should replace "-inf" numeric field values with "NULL"
2003-12-09 17:33:29 +04:00
unknown
6f96fb7956 test for the bug #1885: mysqldump does not dumps timestamp default. 2003-12-09 12:59:00 +04:00
unknown
c167af11e9 Fix for the bug #1885: mysqldump does not dumps timestamp default. 2003-12-09 12:36:57 +04:00
unknown
9a1cb59cd7 Create PID file with O_TRUNC, so that it is emptied before it is written to.
Otherwise, if the previous run ended with a crash, and the PID was 1234,
and you have rebooted the machine and the new PID is 99 then in the PID
file you will have 9934.
Note: users of mysqld_safe did not have the problem because this script
deletes the PID file before starting mysqld.
2003-12-08 20:53:46 +01:00
unknown
c121a73570 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-12-08 20:47:42 +01:00
unknown
a50761a565 Fix for BUG#2045 "Sending SIGHUP to mysqld crashes it if running with --log-bin".
The constructor of Rotate_log_event used when we are rotating our binlog or
relay log, should not assume that there is a nonzero THD available.
For example, when we are reacting to SIGHUP, the THD is 0.
In fact we don't need to use the THD in this constructor;
we can do like for Stop_log_event, and use the minimal Log_event
constructor.
If we were allowed to put Unix-specific commands in the testsuite,
I'd add a test for this (<sigh>).


sql/log.cc:
  A comment to warn that thd can be 0.
  The part about LOG_EVENT_FORCED_ROTATE_F is just to avoid segfault;
  this flag is already removed in 4.1 anyway.
sql/log_event.cc:
  A comment.
sql/log_event.h:
  The constructor of Rotate_log_event used when we are rotating our binlog or
  relay log, should not assume that there is a nonzero THD available.
  For example, when we are reacting to SIGHUP, the THD is 0.
  In fact we don't need to use the THD in this constructor;
  we can do like for Stop_log_event, and use the minimal Log_event
  constructor.
  This fixes BUG#2045 
  "Sending SIGHUP to mysqld crashes it if running with --log-bin"
2003-12-08 16:18:25 +01:00
unknown
da3e63e126 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/mysql-4.0.defweek


sql/mysqld.cc:
  Auto merged
2003-12-07 15:11:08 +04:00
unknown
468dcb6092 WL#1175: more default_week_formats for iso compatibility
New formats added for 'week()' function and 'default_week_format' option(4 - 7).
Next formats is supported now:
*Value* *Meaning*
  `0'     Week starts on Sunday; First Sunday of the year starts week 1.
  	  Week() returns 0-53.
  `1'     Week starts on Monday; Weeks numbered according to ISO 8601:1988.
	  Week() returns 0-53.
  `2'     Week starts on Sunday; First Sunday of the year starts week 1.
  	  Week() returns 1-53.
  `3'     Week starts on Monday; Weeks numbered according to ISO 8601:1988.
	  Week() returns 1-53.
  `4'     Week starts on Sunday; Weeks numbered according to ISO 8601:1988.
	  Week() returns 0-53.
  `5'     Week starts on Monday;  First Monday of the year starts week 1.
  	  Week() returns 0-53.
  `6'     Week starts on Sunday; Weeks numbered according to ISO 8601:1988.
	  Week() returns 1-53.
  `7'     Week starts on Monday;  First Monday of the year starts week 1.
  	  Week() returns 1-53.


mysql-test/r/func_time.result:
  Test for 'default_week_format' option and 'week' function
mysql-test/t/func_time.test:
  Test for 'default_week_format' option and 'week' function
sql/item_timefunc.cc:
  WL#1175 more default_week_formats for iso compatibility
sql/mysql_priv.h:
  WL#1175 more default_week_formats for iso compatibility
sql/mysqld.cc:
  WL#1175 more default_week_formats for iso compatibility
sql/time.cc:
  WL#1175 more default_week_formats for iso compatibility
2003-12-07 15:10:21 +04:00
unknown
f35c834d2f Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/mysql-4.0.pass


sql/sql_parse.cc:
  Auto merged
2003-12-07 13:36:29 +04:00
unknown
007d2e5a6b Fix for #1890 and #1959
This bug happens under Windows & Embedded server
Reason is that pthread_self() always returns NULL in this case.
This confuses thr_lock function and it doesn't stop
thread inserting in the write-locked table.

Global problem is that there's no way under Windows to get
unique thread handle for working thread.
Monty made a workaround for server - we store the thread's handle
we get when we create thread in the thread-specific variable.
This doesn't work with the embedded library for we don't control
thread creation there.

I added code that sets CurrentThreadId as the pthread_self
for the embedded library.
It seems to solve problem because it's unique and we don't use
pthread_self as a parameter for thread functions in embedded library. 


mysys/my_thr_init.c:
  setting of tmp->thread_self added
2003-12-05 21:45:19 +04:00
unknown
e425b98a01 typo fixed 2003-12-05 19:20:06 +03:00
unknown
d4e3cc7219 attempt to make ULONGLONG_MAX work on Windows.
include/config-win.h:
  ULONGLONG_MAX definition added
include/my_global.h:
  comment about config-win.h added
2003-12-05 12:52:07 +03:00
unknown
cea764f387 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/kostja/mysql/mysql-4.0-root
2003-12-05 01:29:20 +03:00
unknown
1057ca5405 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-12-04 22:44:13 +01:00
unknown
66927c51fa - Fix for BUG#1858 "SQL-Thread stops working when using optimize table":
we change THD::system_thread from a 'bool' to a bitmap to be able to
distinguish between delayed-insert threads and slave threads.
- Fix for BUG#1701 "Update from multiple tables" (one line in sql_parse.cc,
plus a new test rpl_multi_update.test). That's just adding an initialization.


sql/repl_failsafe.cc:
  comment to warn about this unused code
sql/slave.cc:
  Now thd->system_thread is a bitmap, not a bool.
sql/sql_class.h:
  'bool' for THD::system_thread is not accurate enough; sometimes we need
  to distinguish between delayed-insert threads and slave threads;
  so changing THD::system_thread to a bitmap (uint).
sql/sql_insert.cc:
  thd.system_thread is now a bitmap
sql/sql_parse.cc:
  We need to initialize thd->lex.select_lex.options in mysql_init_query();
  it's already initialized in dispatch_command() but replication calls
  mysql_parse() directly, thus bypassing dispatch_command().
  Not initing it here leads to a query influencing the next query,
  in the slave SQL thread.
  The initialization in dispatch_command() must be kept as this
  command uses the variable in tests, even when the command was not a
  query (i.e. when mysql_init_query() was not called).
2003-12-04 22:42:18 +01:00
unknown
0cc52bc7ca Merge mysql.com:/home/kostja/mysql/mysql-4.0-root
into mysql.com:/home/kostja/mysql/mysql-4.0-1790
2003-12-05 00:00:02 +03:00
unknown
e101f8b6ee Merge gweir@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/bk/mysql-4.0
2003-12-04 13:59:12 -05:00
unknown
dbd810e075 Fix InstallShield 'String Tables could not be loaded' issue
VC++Files/InstallShield/4.0.XX-classic/String Tables/0009-English/value.shl:
  This should not be the product version; it must match Default.shl
VC++Files/InstallShield/4.0.XX-gpl/String Tables/0009-English/value.shl:
  This should not be the product version; it must match Default.shl
VC++Files/InstallShield/4.0.XX-pro/String Tables/0009-English/value.shl:
  This should not be the product version; it must match Default.shl
2003-12-04 13:58:21 -05:00
unknown
3db325cbba Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/my/mysql-4.0
2003-12-04 19:48:35 +02:00
unknown
ee52d2925d Allow space in service names
move bdb/innodb tests to right places


mysql-test/r/bdb.result:
  Update results after test changes
mysql-test/r/innodb.result:
  Update results after test changes
mysql-test/r/multi_update.result:
  Update results after test changes
mysql-test/t/bdb.test:
  Move bdb tests here
mysql-test/t/innodb.test:
  Move innodb test here
mysql-test/t/multi_update.test:
  move bdb/innodb tests to repective test
sql/mysqld.cc:
  Allow space in service names
2003-12-04 19:48:10 +02:00
unknown
9d85f9919f Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-tsbug
2003-12-04 19:03:20 +03:00
unknown
8f4ed1d72c Fix undeterministic behaviour of year check
if we failed to classify integer as datetime 
in Field_datetime::store().
Stylistic clean-ups.


sql/field.cc:
  Fix undeterministic behaviour of year check 
  if we failed to classify integer as datetime
  Stylistic clean-ups.
2003-12-04 19:02:48 +03:00
unknown
0a9ae10f9e Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-12-04 15:31:14 +01:00
unknown
8479e5a379 Fix for BUG#2011 "rare race condition producing "binlog has bad magic number" error in slave".
The problem was that when the slave SQL thread reads a hot relay log (hot = the one being written to by the
slave I/O thread), it must have the LOCK_log. It already took it for read_log_event(), but needs
it also for check_binlog_magic().
This should fix all recently reported failures of the rpl_max_relay_size test in 4.1 and 5.0
(though the bug exists since 4.0, it showed up first in 5.0).


sql/slave.cc:
  Fix for BUG#2011 "rare race condition producing "binlog has bad magic number" error in slave".
  The problem was that when the slave SQL thread reads a hot relay log (hot = the one being written to by the
  slave I/O thread), it must have the LOCK_log. It already took it for read_log_event(), but needs
  it also for check_binlog_magic().
2003-12-04 15:30:14 +01:00
unknown
8f9baee625 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/mysql-4.0.bugfssl
2003-12-04 14:16:32 +04:00
unknown
c2b60a6f59 Fix for bug#1944 'Function RPad() sometimes produce unexpected result' 2003-12-04 14:12:01 +04:00
unknown
080225e36f Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0
2003-12-03 20:12:47 +03:00
unknown
bc3977ca34 Fix for bug #1980 tests 2003-12-03 19:49:31 +03:00
unknown
930f94bf17 - Bugfix for the Mac OS X startup script: Suppress the annoying
"$1: unbound variable" error when no option was given


support-files/MacOSX/MySQL:
   - Suppress the annoying "$1: unbound variable" error when no option
     was given
2003-12-03 13:56:33 +01:00
unknown
e8fc6d460c Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-12-02 23:33:00 +01:00
unknown
25be07f051 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0
2003-12-02 21:16:57 +03:00
unknown
8be4234f61 Fix for bug #1980
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-12-02 21:05:40 +03:00
unknown
465881c21a Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/dlenev/src/mysql-4.0-tsbg
2003-12-02 20:30:10 +03:00
unknown
f5d7229762 Fix for Bug #1448 "Date parsing fails, and fails to complain
about it". Now numbers representing illegal timestamps are 
converted to 0 value if they are stored as timestamp or 
datetime. This behaviour is consistent with manual and with 
behaviour of string -> timestamp conversion.


mysql-test/r/type_datetime.result:
  Added test if ranges are checked during 
  integer, string -> timestamp conversion
mysql-test/r/type_timestamp.result:
  Added test if ranges are checked during 
  integer, string -> datetime conversion
mysql-test/t/type_datetime.test:
  Added test if ranges are checked during 
  integer, string -> datetime conversion
mysql-test/t/type_timestamp.test:
  Added test if ranges are checked during 
  integer, string -> timestamp conversion
sql/field.cc:
  Checks of month, day, hour, minute and second ranges were added
  to storing of integer into Field_datetime and Field_timestamp
  and so for integer -> datetime, timestamp conversion.
2003-12-02 20:25:45 +03:00
unknown
a2bdd6218c Post-review fixes for bug #1790 'BIT_AND() result in GROUP BY different when
SQL_BIG_RESULT used':
- BIT_AND now returns BIGINT UNSIGNED
- in case there were no matching rows BIT_AND returns 18446744073709551615 
(but not NULL), BIT_OR returns 0 (but not NULL). That's how Monty wants it
and how is described in our docs.




include/my_global.h:
  Added definition for ULONGLONG_MAX.
  This is also a check that ULL type specifier
  can be used on all supported platforms.
mysql-test/r/func_group.result:
  bug #1790, post-review work: test results fixed
sql/item_sum.cc:
  small cleanup
sql/item_sum.h:
  few style fixes.
  BIT_AND and BIT_OR now are both BIGINT UNSIGNED
2003-12-02 19:39:51 +03:00
unknown
b9418600bf There is no reason that Intvar_log_event's constructor calls Log_event::Log_event()
instead of Log_event::Log_event(THD*, ...) when the event is built in the master
to be written in the binlog.
Rand_log_event already used the good constructor, so there really is no reason
for Intvar_log_event to be an exception.
This fixes a test failure of last night (which appeared after I removed a useless
e.server_id=thd->server_id in log.cc; in fact this line was not useless because
it hid the bad constructor).
Replication tests pass, with Valgrind too.


sql/log_event.h:
  There is no reason that Intvar_log_event's constructor calls Log_event::Log_event()
  instead of Log_event::Log_event(THD*, ...) when the event is built in the master
  to be written in the binlog.
  Rand_log_event already used the good constructor, so there really is no reason
  for Intvar_log_event to be an exception.
  This fixes a test failure of last night (which appeared after I removed a useless
  e.server_id=thd->server_id in log.cc; in fact this line was not useless because
  it hid the bad constructor).
2003-12-02 16:49:46 +01:00