Commit dc452563 authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

Small bug fixes + code for DELETE QUICK

parent f2f515e5
Loading
Loading
Loading
Loading
+50 −25
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ Functions for use in @code{SELECT} and @code{WHERE} clauses
MySQL table types
* MyISAM::                      MyISAM tables
* MERGE::                       
* MERGE::                       MERGE tables
* ISAM::                        ISAM tables
* HEAP::                        HEAP tables
* BDB::                         BDB or Berkeley_db tables
@@ -2345,21 +2345,21 @@ from the local @strong{MySQL} list.
The following @strong{MySQL} mailing lists exist:
@table @code
@item announce
@item announce (@email{announce-subscribe@@lists.mysql.com})
This is for announcement of new versions of @strong{MySQL} and related
programs. This is a low volume list that we think all @strong{MySQL}
users should be on.
@item mysql
@item mysql (@email{mysql-subscribe@@lists.mysql.com})
The main list for general @strong{MySQL} discussion. Please note that some
topics are better discussed on the more-specialized lists. If you post to the
wrong list, you may not get an answer!
@item mysql-digest
@item mysql-digest (@email{mysql-digest-subscribe@@lists.mysql.com})
The @code{mysql} list in digest form. That means you get all individual
messages, sent as one large mail message once a day.
@item bugs
@item bugs (@email{bugs-subscribe@@lists.mysql.com})
On this list you should only post a full, repeatable bug report, using
the @code{mysqlbug} script (if you are running on Windows, you should
include a description of the operating system and the @strong{MySQL} version).
@@ -2371,45 +2371,45 @@ this list will be corrected or documented in the next @strong{MySQL} release!
If there are only small code changes involved, we will also post a patch that 
fixes the problem.
@item bugs-digest
@item bugs-digest (@email{bugs-digest-subscribe@@lists.mysql.com})
The @code{bugs} list in digest form
@item developer
@item developer (@email{developer-subscribe@@lists.mysql.com})
A list for people who work on the @strong{MySQL} code. On this list one
can also discuss @strong{MySQL} development and post patches.
@item developer-digest
@item developer-digest (@email{developer-digest-subscribe@@lists.mysql.com})
A digest version of the @code{developer} list.
@item java
@item java (@email{java-subscribe@@lists.mysql.com})
Discussion about @strong{MySQL} and Java. Mostly about the JDBC drivers.
@item java-digest
@item java-digest (@email{java-digest-subscribe@@lists.mysql.com})
A digest version of the @code{java} list.
@item win32
@item win32 (@email{win32-subscribe@@lists.mysql.com})
All things concerning @strong{MySQL} on Microsoft operating systems such as
Win95, Win98, NT and Win2000.
@item win32-digest
@item win32-digest (@email{win32-digest-subscribe@@lists.mysql.com})
A digest version of the @code{win32} list.
@item myodbc
@item myodbc (@email{myodbc-subscribe@@lists.mysql.com})
All things concerning connecting to @strong{MySQL} with ODBC.
@item myodbc-digest
@item myodbc-digest (@email{myodbc-digest-subscribe@@lists.mysql.com})
A digest version of the @code{myodbc} list.
@item plusplus
@item plusplus (@email{plusplus-digest-subscribe@@lists.mysql.com})
All things concerning programming with the C++ API to @strong{MySQL}.
@item plusplus-digest
@item plusplus-digest (@email{plusplus-digest-subscribe@@lists.mysql.com})
A digest version of the @code{plusplus} list.
@item msql-mysql-modules
@item msql-mysql-modules (@email{msql-mysql-modules-subscribe@@lists.mysql.com})
A list about the Perl support in @strong{MySQL}.
@item msql-mysql-modules-digest
@item msql-mysql-modules-digest (@email{msql-mysql-modules-digest-subscribe@@lists.mysql.com})
A digest version of the @code{msql-mysql-modules} list.
@end table
@@ -4720,7 +4720,7 @@ shell> /usr/sbin/swinstall -s /path/to/depot mysql.developer
The depot places binaries and libraries in @file{/opt/mysql} and data in
@file{/var/opt/mysql}. The depot also creates the appropriate entries in
@file{/sbin/init.d} and @file{/sbin/rc2.d} to start the server automatically
@file{/etc/init.d} and @file{/etc/rc2.d} to start the server automatically
at boot time. Obviously, this entails being @code{root} to install.
To install the HP-UX tar.gz distribution, you must have a copy of GNU
@@ -17715,6 +17715,8 @@ If you specify the keyword @code{LOW_PRIORITY}, execution of the
In this case the client has to wait until the insert statement is completed,
which may take a long time if the table is in heavy use. This is in
contrast to @code{INSERT DELAYED} which lets the client continue at once.
Note that @code{LOW_PRIORITY} should normally not be used with @code{MyISAM}
tables as this disables concurrent inserts.@xref{MyISAM}.
@item
If you specify the keyword @code{IGNORE} in an @code{INSERT} with many value
@@ -18518,7 +18520,7 @@ the @code{mysql} database.
@item @code{TABLES table_name [,table_name...]} @tab Flush only the given tables
@item @code{TABLES WITH READ LOCK} @tab Closes all open tables and locks all tables for all databases with a read until one executes @code{UNLOCK TABLES}.
@item @code{TABLES WITH READ LOCK} @tab Closes all open tables and locks all tables for all databases with a read until one executes @code{UNLOCK TABLES}. This is very convinient way to get backups if you have a file system, like Veritas,that can take snapshots in time.
@item @code{STATUS} @tab Resets most status variables to zero.
@end multitable
@@ -19686,7 +19688,10 @@ table in the server and implemented with @code{pthread_mutex_lock()} and
See @ref{Internal locking}, for more information on locking policy.
You can also lock all tables in all databases with read locks with the
@code{FLUSH TABLES WITH READ LOCK} command. @xref{FLUSH}.
@code{FLUSH TABLES WITH READ LOCK} command. @xref{FLUSH}. This is very
convinient way to get backups if you have a file system, like Veritas,
that can take snapshots in time.
@findex SET OPTION
@node SET OPTION, GRANT, LOCK TABLES, Reference
@@ -21351,6 +21356,14 @@ article (item number) for certain traders (dealers). Supposing that each
trader has a single fixed price per article, then (@code{item},
@code{trader}) is a primary key for the records.
Start the command line tool @code{mysql} and select a database:
@example
mysql your-database-name
@end example
(In most @strong{MySQL} installations, you can use the database-name 'test').
You can create the example table as:
@example
@@ -21486,7 +21499,7 @@ In @strong{MySQL} it's best do it in several steps:
@enumerate
@item
Get the list of (article,maxprice). @xref{example-Maximum-column-group-row}.
Get the list of (article,maxprice).
@item
For each article get the corresponding rows which have the stored maximum
price.
@@ -21499,11 +21512,11 @@ CREATE TEMPORARY TABLE tmp (
        article INT(4) UNSIGNED ZEROFILL DEFAULT '0000' NOT NULL,
        price   DOUBLE(16,2)             DEFAULT '0.00' NOT NULL);
LOCK TABLES article read;
LOCK TABLES shop read;
INSERT INTO tmp SELECT article, MAX(price) FROM shop GROUP BY article;
SELECT article, dealer, price FROM shop, tmp
SELECT shop.article, dealer, price FROM shop, tmp
WHERE shop.article=tmp.article AND shop.price=tmp.price;
UNLOCK TABLES;
@@ -28747,6 +28760,10 @@ that when you export data to @strong{MySQL}, the table and column names
aren't specified.  Another way to around this bug is to upgrade to
MyODBC 2.50.33 and @strong{MySQL} 3.23.x, which together provides a
workaround for this bug!
Note that if you are using @strong{MySQL} 3.22, you must to apply the
MDAC patch and use MyODBC 2.50.32 or 2.50.34 and above to go around
this problem.
@item
Set the ``Return matching rows'' MyODBC option field when connecting to
@strong{MySQL}.
@@ -36307,10 +36324,18 @@ though, so 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.25
@itemize @bullet
@item
Fixed a bug where @code{FULLTEXT} index always used the koi8_ukr
character set.
@item
Fixed privilege checking for @code{CHECK TABLE}.
@item
The @code{MyISAM} repair/reindex code didn't use the @code{--tempdir}
option for it's temporary files.
@item
Fixed a core dump bug when doing @code{FLUSH MASTER} when one didn't give
a filename argument to @code{--log-bin}
@item
Added missing ha_berkeley.x files to the MySQL windows source distribution.
Added missing ha_berkeley.# files to the windows source distribution.
@item
Fixed some mutex bugs in the log code that could cause thread blocks if new
log files couldn't be created.
+1 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,7 @@ AC_CHECK_FUNCS(alarm bmove \
 pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
 pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
 pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
 crypt dlopen dlerror fchmod getpass getpassphrase initgroups, mlockall)
 crypt dlopen dlerror fchmod getpass getpassphrase initgroups mlockall)

# Sanity check: We chould not have any fseeko symbol unless
# large_file_support=yes
+1 −0
Original line number Diff line number Diff line
@@ -290,6 +290,7 @@ inline double ulonglong2double(ulonglong value)
#define MY_NFILE	127	/* This is only used to save filenames */


#define DO_NOT_REMOVE_THREAD_WRAPPERS
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
/* The following is only used for statistics, so it should be good enough */
#ifdef __NT__  /* This should also work on Win98 but .. */
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ typedef struct st_ft_doclist {
extern const char *ft_precompiled_stopwords[];

int ft_init_stopwords(const char **);
void ft_free_stopwords(void);

FT_DOCLIST * ft_init_search(void *, uint, byte *, uint, my_bool);
int          ft_read_next(FT_DOCLIST *, char *);
+39 −37
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ struct timespec { /* For pthread_cond_timedwait() */
    long tv_nsec;
};

typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#define pthread_handler_decl(A,B) unsigned __cdecl A(void *B)
typedef unsigned (__cdecl *pthread_handler)(void *);
@@ -215,42 +216,6 @@ extern int my_pthread_getprio(pthread_t thread_id);
#define pthread_handler_decl(A,B) void *A(void *B)
typedef void *(* pthread_handler)(void *);

/* safe mutex for debugging */

typedef struct st_safe_mutex_t
{
  pthread_mutex_t global,mutex;
  char *file;
  uint line,count;
  pthread_t thread;
} safe_mutex_t;

int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr);
int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
		   uint line);
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
			struct timespec *abstime, const char *file, uint line);

#ifdef SAFE_MUTEX
#undef pthread_mutex_init
#undef pthread_mutex_lock
#undef pthread_mutex_unlock
#undef pthread_mutex_destroy
#undef pthread_mutex_wait
#undef pthread_mutex_timedwait
#undef pthread_mutex_t
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B))
#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
#define pthread_mutex_t safe_mutex_t
#endif

/* Test first for RTS or FSU threads */

#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
@@ -424,6 +389,43 @@ struct hostent *my_gethostbyname_r(const char *name,

#endif /* defined(__WIN__) */

	/* safe_mutex adds checking to mutex for easier debugging */

typedef struct st_safe_mutex_t
{
  pthread_mutex_t global,mutex;
  char *file;
  uint line,count;
  pthread_t thread;
} safe_mutex_t;

int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr);
int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
		   uint line);
int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
			struct timespec *abstime, const char *file, uint line);

	/* Wrappers if safe mutex is actually used */
#ifdef SAFE_MUTEX
#undef pthread_mutex_init
#undef pthread_mutex_lock
#undef pthread_mutex_unlock
#undef pthread_mutex_destroy
#undef pthread_mutex_wait
#undef pthread_mutex_timedwait
#undef pthread_mutex_t
#define pthread_mutex_init(A,B) safe_mutex_init((A),(B))
#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
#define pthread_mutex_t safe_mutex_t
#endif /* SAFE_MUTEX */

	/* READ-WRITE thread locking */

#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS)
Loading