Commit graph

6588 commits

Author SHA1 Message Date
unknown
9adfaf1b2f Added option --skip-kill-mysqld to mysqld_safe. This can be useful,
if one is running many mysqlds through mysqld_multi, for example.
Without this option, on Linux one mysqld_safe process may kill
other mysqlds as well, if started using the same binary and path.
2003-06-14 12:29:42 +03:00
unknown
556d6d2ebc - replaced obsolete Macro AM_CONFIG_HEADER with AC_CONFIG_HEADERS
- Added missing function name in checking for sem_init in posix4 libs on
   Solaris
2003-06-13 14:47:23 +02:00
unknown
f5fba55325 Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0


sql/sql_parse.cc:
  Auto merged
2003-06-12 22:40:08 +03:00
unknown
dd2836c4c1 Changed safemalloc structure to not have to be 8 byte aligned. (Portability problem)
include/my_sys.h:
  Changed safe_malloc variables to start with sf_
mysys/default.c:
  Use safemalloc (as we use dynamic_arrays() that uses it inderectly anyway)
mysys/my_static.c:
  Changed safe_malloc variables to start with sf_
mysys/my_static.h:
  Changed safe_malloc variables to start with sf_
  Changed safemalloc structure to not have to be 8 byte aligned
mysys/safemalloc.c:
  Changed safemalloc structure to not have to be 8 byte aligned. (portability fix)
  BIG code cleanup
sql/mysqld.cc:
  Changed safe_malloc variables to start with sf_
sql/sql_parse.cc:
  Changed safe_malloc variables to start with sf_
2003-06-12 22:39:45 +03:00
unknown
58fb175f24 removed a wrong cast that limited ulonglong options to max. ulong value. 2003-06-12 18:46:12 +02:00
unknown
9f44a7baa3 HANDLER priv check fixed 2003-06-12 17:38:15 +02:00
unknown
99a0f20c6f typed moved to a proper place 2003-06-12 17:05:45 +02:00
unknown
2a450f0c1e Indentation
mysys/safemalloc.c:
  Indentation fixes
  Changes (long*) to (uint32*) to fix a portability problem
2003-06-12 16:25:26 +03:00
unknown
5efaeb958e - applied patch for mysqld_safe from Christian Hammers to be able to
define a different niceness level in my.cnf (Bug #627)


scripts/mysqld_safe.sh:
   - applied patch from Christian Hammers to be able to define a different
     niceness level in my.cnf (Bug #627)
2003-06-12 13:52:24 +02:00
unknown
1273bf20c8 Merge mysql.com:/space/my/mysql-4.0
into mysql.com:/space/my/mysql-4.0-build
2003-06-12 11:06:01 +02:00
unknown
4885c3ff9d test case for bug #614
mysql-test/r/func_time.result:
  result's checking added
mysql-test/t/func_time.test:
  testcase added
2003-06-11 22:07:23 +05:00
unknown
a59410fd68 Bugfix for #614
Item_extract needs special implementation for eq().
Item_func::eq doesn't work correctly because we have to compare 
Item_extract::int_type parameters also

We need to propagate this to 4.1


sql/item_timefunc.cc:
  Item_extract::eq implementation added
sql/item_timefunc.h:
  Item_extract::eq definition added
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-06-11 20:09:37 +05:00
unknown
a18c4883dc os0file.c:
Prevent on Windows starting of two mysqld instances on SAME InnoDB files: that could cause severe database corruption


innobase/os/os0file.c:
  Prevent on Windows starting of two mysqld instances on SAME InnoDB files: that could cause severe database corruption
2003-06-11 15:41:03 +03:00
unknown
bcdde9a556 - applied patch to mysql_explain_log.sh provided by Dennis Haney
to accept --socket option (Bug #592)


scripts/mysql_explain_log.sh:
   - applied patch provided by Dennis Haney to accept --socket option
     (Bug #592)
2003-06-11 13:40:20 +02:00
unknown
497e11035d - fixed a path to init script in RPM spec file (/sbin/init.d is obsolete)
support-files/mysql.spec.sh:
   - fixed path to init script (/sbin/init.d is obsolete)
2003-06-11 13:38:02 +02:00
unknown
16ec93654c Merge gbichot@213.136.52.20:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0


mysql-test/mysql-test-run.sh:
  Auto merged
2003-06-10 23:31:09 +02:00
unknown
0880795793 More error messages. This is intended to help debugging; presently I have a
support issue with an unclear message which can have N reasons for appearing.
This should help us know at which point it failed, and get the errno when
my_open was involved (as the reason for the unclear message is often a
permission problem).
RESET SLAVE resets last_error and last_errno in SHOW SLAVE STATUS (without this,
rpl_loaddata.test, which is expected to generate an error in last_error, influenced
rpl_log_pos.test).
A small test update.
Added STOP SLAVE to mysql-test-run to get rid of several stupid error messages
which are printed while the master restarts and the slave attempts/manages to
connect to it and sends it nonsense binlog requests.


mysql-test/mysql-test-run.sh:
  Before running a test, stop slave threads if they exist (if they don't
  the script goes on fine). This also works fine with the manager.
  Before this change, when the master was stopped/restarted (which happened before
  the slave server was stopped/restarted), the slave threads
  noticed the stop (so printed an error message in slave.err), then managed to
  reconnect (to the new master, the one that is running for the _next_ test),
  and this reconnection had time to produce error messages (because, for example,
  the binlog the slave thread was asking had been deleted) before the slave server
  was killed. This change reduces by 10% (40 lines) slave.err in replication tests.
mysql-test/r/rpl000018.result:
  Result update.
mysql-test/t/rpl000018.test:
  This test does "show master logs" so should do "reset master" instead of
  relying on the previous tests.
sql/slave.cc:
  More error messages.
sql/sql_repl.cc:
  More error messages.
  RESET SLAVE resets last_error and last_errno in SHOW SLAVE STATUS.
2003-06-10 23:29:49 +02:00
unknown
a1a58d6c5a Don't install signal handler for SIGINT by default
Added option --gdb
Free memory used by replicate_xxx and binglog_xxx options


mysql-test/mysql-test-run.sh:
  Added --gdb when using gdb
mysys/thr_alarm.c:
  Safety check
sql/mysql_priv.h:
  Don't install signal handler for SIGINT by default
sql/mysqld.cc:
  Don't install signal handler for SIGINT by default
  Added option --gdb
  Free memory used by replicate_xxx and binglog_xxx options.
  Add statistics variable for killed threads
sql/repl_failsafe.cc:
  Incremented aborted_connects on failure
sql/sql_list.cc:
  Added free_list() to free memory on shutdown.
2003-06-10 21:42:29 +03:00
unknown
87473e96b7 Translation updated
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2003-06-08 02:53:41 -04:00
unknown
e5ae26c719 page0page.c:
Fix a bug: a race condition could cause that the first B-tree page splits would get a corrupt page directory, whic often results in the assertion in page_dir_find_slot(); found with a test of 3000 startups/shutdowns; it is not clear that this would have caused any corruption which users have reported


innobase/page/page0page.c:
  Fix a bug: a race condition could cause that the first B-tree page splits would get a corrupt page directory, whic often results in the assertion in page_dir_find_slot(); found with a test of 3000 startups/shutdowns; it is not clear that this would have caused any corruption which users have reported
2003-06-07 10:25:56 +03:00
unknown
c126f4fa44 Merge gbichot@213.136.52.20:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-06-06 16:42:48 +02:00
unknown
a0120344b9 Fix for bug 254 :
we now make a distinction between if the master is < 3.23.57, 3.23 && >=57, and 4.x
(before the 2 3.23 were one). This is because in 3.23.57 we have a way to distinguish between
a Start_log_event written at server startup and one written at FLUSH LOGS, so we
have a way to know if the slave must drop old temp tables or not.
Change: mi->old_format was bool, now it's enum (to handle 3 cases). However, functions
which had 'bool old_format' as an argument have their prototypes unchanged, because
the old old_format == 0 now corresponds to the enum value BINLOG_FORMAT_CURRENT which
is equal to 0, so boolean tests are left untouched. The only case were we use mi->old_format
as an enum instead of casting it implicitly to a bool, is in Start_log_event::exec_event,
where we want to distinguish between the 3 possible enum values.


sql/log_event.cc:
  Fix for bug 254 :
  we now make a distinction between if the master is < 3.23.57, 3.23 && >=57, and 4.x
  (before the 2 3.23 were one), to know if the slave must drop old temp tables or not.
sql/slave.cc:
  Fix for bug 254 : mi->old_format is now enum.
  An unrelated comment.
sql/slave.h:
  fix for bug 254 : mi->old_format is now enum.
2003-06-06 16:41:28 +02:00
unknown
07d6a19955 In Start_log_event::print, don't print "created 1970 etc" if created == 0.
Otherwise, we'll get questions from users about this curious 1970.
2003-06-06 14:13:26 +02:00
unknown
98f57fbe95 -- already approved; it would be nice if it goes into 3.23.57 --
Fix for bug 254 : the first Start_log_event after server startup will
have created=now(), whereas the next ones (FLUSH LOGS, auto rotation)
will have created=0. Before this, it was always now().
This way, slaves >=4.0.14 will know when they must
drop stale temp tables or not. The next task is now modify 4.0.14 to
implement this.


sql/log.cc:
  Fix for bug 254 : the first Start_log_event after server startup will
  have created=now(), whereas the next ones (FLUSH LOGS, auto rotation)
  will have created=0. Before this, it was always now().
  This way, slaves >=4.0.14 will know when they must
  drop stale temp tables or not.
sql/log_event.h:
  An explanation.
sql/sql_class.h:
  Prototype change (see log.cc).
2003-06-06 13:52:15 +02:00
unknown
1e7dfec5c7 sql_yacc.yy, sql_parse.cc, sql_lex.h, mysqld.cc, lex.h:
Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.


sql/lex.h:
  Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.
sql/mysqld.cc:
  Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.
sql/sql_lex.h:
  Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.
sql/sql_parse.cc:
  Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.
sql/sql_yacc.yy:
  Add syntax SAVEPOINT id and ROLLBACK TO SAVEPOINT id. This is compatible with DB2 and Oracle but not with SQL Server. Savepoints do not do anything yet, this is just parsing.
2003-06-06 04:18:58 +03:00
unknown
bd414c301c Test for bug 578. And a comment in slave.cc.
sql/slave.cc:
  Comment to remember that size of relay logs on disk is not the total size
  of the relay log.
2003-06-05 17:02:00 +02:00
unknown
a3afb2bcbe Added function comment 2003-06-05 17:25:09 +03:00
unknown
a86c80e46a Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into ua126d19.elisa.omakaista.fi:/home/my/bk/mysql-4.0
2003-06-05 16:57:36 +03:00
unknown
35cd3cbac7 mysqld won't give a warning any more, if --user=user_name is used,
if 'user_name' is the current user and it is not root.
2003-06-05 16:56:38 +03:00
unknown
d3d86c127a ha_innodb.cc:
Revert a change to dict_mem_index_add_field which slipped prematurely into the bk tree


sql/ha_innodb.cc:
  Revert a change to dict_mem_index_add_field which slipped prematurely into the bk tree
2003-06-05 16:06:38 +03:00
unknown
6d4ed16787 ha_innodb.cc, handler.cc:
Fix the BDB crash in the previous push; to save CPU remove duplicate calls of commit in InnoDB


sql/handler.cc:
  Fix the BDB crash in the previous push; to save CPU remove duplicate calls of commit in InnoDB
sql/ha_innodb.cc:
  Fix the BDB crash in the previous push; to save CPU remove duplicate calls of commit in InnoDB
2003-06-05 15:58:23 +03:00
unknown
d6f2e8c173 Merged fix for alarm on big blocks 2003-06-05 15:21:10 +03:00
unknown
4916da252c Fixed test if thr_alarm() failed 2003-06-05 15:15:27 +03:00
unknown
fb286d8b90 Merge jani@192.168.0.2:/my/mysql-4.0
into ua126d19.elisa.omakaista.fi:/home/my/bk/mysql-4.0
2003-06-05 15:07:28 +03:00
unknown
5bc53e8a3b Fixed a bug in concat_ws(), which did not add concat separator
in case of an empty string. Bug ID 586.
2003-06-05 15:06:19 +03:00
unknown
cd7148472a Print error if we can't delete an alarm
More debugging variables
Increment aborted_threads in case of killed or too big packet


include/thr_alarm.h:
  made prototype more portable
mysys/thr_alarm.c:
  Print error if we can't delete an alarm
sql/mysqld.cc:
  Statistics variable (for debugging)
sql/net_serv.cc:
  statistics variable (for debugging)
sql/sql_parse.cc:
  Increment aborted_threads in case of killed or too big packet
2003-06-05 12:29:13 +03:00
unknown
080f3bd21d Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-06-05 12:17:46 +03:00
unknown
280d462ca1 Merge with 3.23 to get fix for thr_alarm and big packets 2003-06-05 12:00:06 +03:00
unknown
9b73c7097a Fixed problem with alarms when reading too big packet 2003-06-05 11:55:03 +03:00
unknown
ee23e85e82 Merge lgrimmer@build.mysql.com:/home/bk/mysql-4.0
into mysql.com:/space/my/mysql-4.0
2003-06-04 22:38:35 +02:00
unknown
bd49ae5f74 - When compiling the Max package incl. RAID support using gcc, make sure
to set CXX=gcc (cannot link the code with g++) - this should help to
   recompile the RPM on Distributions using gcc 3
 - Added a symlink /usr/sbin/rcmysql -> /etc/init.d/mysql
2003-06-04 22:31:06 +02:00
unknown
c98248649d Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into narttu.mysql.fi:/my/mysql-4.0
2003-06-04 23:17:45 +03:00
unknown
487bf48ad6 - Updated Default-Stop run levels in the LSB header section to satisfy
Red Hat's chkconfig (Bug #272) (The LSB spec is a bit ambigous about
   what actually needs to be put into this field)
2003-06-04 17:31:21 +02:00
unknown
b5860aed7b Fixed (not fatal) buffer overflow 2003-06-04 18:22:48 +03:00
unknown
fb339587a5 handler.cc:
If the autocommit is on, let handler.cc commit or rollback the whole transaction at an updating SQL statement end. This probably fixes bug number 578. The problem was that when explicit LOCK TABLES is used, then the lock count method in autocommit does not work.


sql/handler.cc:
  If the autocommit is on, let handler.cc commit or rollback the whole transaction at an updating SQL statement end. This probably fixes bug number 578. The problem was that when explicit LOCK TABLES is used, then the lock count method in autocommit does not work.
2003-06-04 17:58:41 +03:00
unknown
a91d2fcbd9 Added [mysqld-base-version] as a default group for the mysqld server
Portability fix for Windows 64


include/config-win.h:
  Portability fix for Windows 64
include/my_global.h:
  Portability fix for Windows 64
include/mysql_version.h.in:
  Added [mysqld-base-version] as a default group for the mysqld server
innobase/include/univ.i:
  Portability fix for Windows 64
sql/mysqld.cc:
  Added [mysqld-base-version] as a default group for the mysqld server
2003-06-04 16:05:27 +03:00
unknown
6d3cf400d4 Merge gbichot@213.136.52.20:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
2003-06-03 23:14:09 +02:00
unknown
6d1081cda2 One-line fix for bug 576 (DBUG_ASSERT failure when using CHANGE MASTER TO RELAY_LOG_POS=4).
Plus a changeset which I had committed but forgot to push (and this changeset is lost on
another computer, so I recreate it here). This changeset is "user-friendly SHOW BINLOG EVENTS
and CHANGE MASTER TO when log positions < 4 are used.


sql/slave.cc:
  fix for bug 576 (DBUG_ASSERT failure when using CHANGE MASTER TO RELAY_LOG_POS=4).
sql/sql_repl.cc:
  User-friendly SHOW BINLOG EVENTS:
  SHOW BINLOG EVENTS FROM 0: currently one gets
      MASTER> show binlog events from 0;
      ERROR 1220: Error when executing command SHOW BINLOG EVENTS: Invalid log position
  so we silently convert <4 to 4.
sql/sql_yacc.yy:
  User-friendly CHANGE MASTER TO:
  presently when one does CHANGE MASTER TO MASTER_LOG_POS=0 he gets
      030425 10:12:41  Slave I/O thread: connected to master 'root@localhost:3306',  r
      eplication started in log 'gbichot-bin.013' at position 151
      030425 10:12:41  Error reading packet from server: Client requested master to st
      art replication from impossible position (server_errno=1236)
      030425 10:12:41  Got fatal error 1236: 'Client requested master to start replica
      tion from impossible position' from master when reading data from binary log
      030425 10:12:41  Slave I/O thread exiting, read up to log 'gbichot-bin.013', pos
      ition 151
      
  while she/he probably just wanted to start at the beginning of the
  binlog, which is 4. So we silently convert <4 to 4 in sql_yacc.yy
  (i.e. in the slave code; fortunately all versions have the same
  BIN_LOG_HEADER_SIZE=4 and we should not change this). See comments
  for an explaination of why we have to do this in sql_yacc.yy,
  not in sql_repl.cc.
  Same thing for CHANGE MASTER TO RELAY_LOG_POS.
sql/unireg.h:
  warning comment
2003-06-03 23:13:06 +02:00
unknown
c9505d8fc1 A fix for small stack overflow ... 2003-06-03 18:25:45 +03:00
unknown
ccb398b9ee -- Waiting for Monty's approval before push --
Bug 571: play LOAD DATA INFILE the same way on the slave as it was on the master: 
if it was with IGNORE, do it with IGNORE,
if it was with REPLACE, do it with REPLACE,
and (the change) if it was with nothing, do it with nothing (not with IGNORE !!).
Bug 573: print a proper error message in case of duplicate entry in LOAD DATA INFILE
on the slave, i.e. a message where the keyname and key value appear :
'Duplicate entry '1' for key 1' and not 'Duplicate entry '%-.64s' for key %d'


mysql-test/r/rpl_loaddata.result:
  result update
mysql-test/t/rpl_loaddata.test:
  check if duplicate entries on the slave trigger an error 
  when the slave replicates LOAD DATA INFILE (without IGNORE or REPLACE)
  (bug 571).
sql/log_event.cc:
  Bug 571: play LOAD DATA INFILE the same way on the slave as it was on the master: 
  if it was with IGNORE, do it with IGNORE,
  if it was with REPLACE, do it with REPLACE,
  and (the change) if it was with nothing, do it with nothing (not with IGNORE !!).
  Bug 573: print a proper error message in case of duplicate entry in LOAD DATA INFILE
  on the slave, i.e. a message where the keyname and key value appear :
  'Duplicate entry '1' for key 1' and not 'Duplicate entry '%-.64s' for key %d'
2003-06-03 15:47:29 +02:00