Commit 6b02f13c authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Removed compiler warnings.

Added new operators to be used with gcc 3.0.x
Update of query cache code.
Added semaphores for Windows (not yet in use)
Added pthread_mutex_trylock for windows.
parent a1f9987b
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -18506,9 +18506,12 @@ If this is 0, the query cache is disabled (default).
@item @code{query_cache_startup_type}
This may be set (only numeric) to
0 (OFF, don't cache or retrieve results),
1 (ON, cache all results except @code{SELECT SQL_NO_CACHE ...} queries) or
2 (DEMAND, cache only @code{SELECT SQL_CACHE ...} queries).
@multitable @columnfractions .1 .2 .7
@item @strong{Value} @tab @strong{Alias} @tab @strong{Comment}
@item 0 @tab OFF @tab Don't cache or retrieve results.
@item 1 @tab ON @tab Cache all results except @code{SELECT SQL_NO_CACHE ...} queries.
@item 2 @tab DEMAND @tab Cache only @code{SELECT SQL_CACHE ...} queries.
@end multitable
@item @code{safe_show_databases}
Don't show databases for which the user doesn't have any database or
+4 −3
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ see the @code{crash-me} web page at
@node Compare mSQL, Compare PostgreSQL, Comparisons, Comparisons
@subsection How MySQL Compares to @code{mSQL}

@cindex mSQL, MySQL vs mSQL, overview
@table @strong
@item Performance

@@ -301,7 +302,7 @@ multiple connections to the server from the same process.
@subsubsection How @code{mSQL} and MySQL Client/Server Communications Protocols Differ

@cindex communications protocols
@cindex mSQL vs. MySQL
@cindex mSQL vs. MySQL, protocol

There are enough differences that it is impossible (or at least not easy)
to support both.
@@ -557,7 +558,6 @@ satisfies your application. If you need raw speed, MySQL is probably your
best choice.  If you need some of the extra features that only PostgreSQL
can offer, you should use @code{PostgreSQL}.

@cindex PostgreSQL/MySQL, strategies
@menu
* MySQL-PostgreSQL goals::      MySQL and PostgreSQL development strategies
* MySQL-PostgreSQL features::   Featurewise Comparison of MySQL and PostgreSQL
@@ -568,6 +568,7 @@ can offer, you should use @code{PostgreSQL}.
@node MySQL-PostgreSQL goals, MySQL-PostgreSQL features, Compare PostgreSQL, Compare PostgreSQL
@subsubsection MySQL and PostgreSQL development strategies

@cindex PostgreSQL vs. MySQL, strategies
When adding things to MySQL we take pride to do an optimal, definite
solution.  The code should be so good that we shouldn't have any need to
change it in the foreseeable future.  We also do not like to sacrifice
@@ -609,7 +610,7 @@ code, we are better able to coordinate new features and releases.
@node MySQL-PostgreSQL features, MySQL-PostgreSQL benchmarks, MySQL-PostgreSQL goals, Compare PostgreSQL
@subsubsection Featurewise Comparison of MySQL and PostgreSQL

@cindex PostgreSQL/MySQL, features
@cindex PostgreSQL vs. MySQL, features

On the crash-me page
(@uref{http://www.mysql.com/information/crash-me.php})
+2 −2
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ static void dump_remote_log_entries(const char* logname)

static int check_header(IO_CACHE* file)
{
  char buf[PROBE_HEADER_LEN];
  byte buf[PROBE_HEADER_LEN];
  int old_format;

  my_off_t pos = my_b_tell(file);
+69 −63
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@

**********************************************************************/

#define MTEST_VERSION "1.11"
#define MTEST_VERSION "1.12"

#include <my_global.h>
#include <mysql_embed.h>
@@ -140,8 +140,8 @@ PARSER parser;
MASTER_POS master_pos;
int *block_ok; /* set to 0 if the current block should not be executed */
int false_block_depth = 0;
const char* result_file = 0; /* if set, all results are concated and
				compared against this file*/
/* if set, all results are concated and compared against this file */
const char *result_file = 0;

typedef struct
{
@@ -158,7 +158,7 @@ typedef struct
VAR var_reg[10];
/*Perl/shell-like variable registers */
HASH var_hash;
int disable_query_log=0;
int disable_query_log=0, disable_result_log=0;

struct connection cons[MAX_CONS];
struct connection* cur_con, *next_con, *cons_end;
@@ -181,6 +181,7 @@ Q_PING, Q_EVAL,
Q_RPL_PROBE,        Q_ENABLE_RPL_PARSE,
Q_DISABLE_RPL_PARSE, Q_EVAL_RESULT,
Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG,
Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER,
Q_UNKNOWN,                             /* Unknown command.   */
Q_COMMENT,                             /* Comments, ignored. */
@@ -215,6 +216,7 @@ const char *command_names[] = {
  "rpl_probe",        "enable_rpl_parse",
  "disable_rpl_parse", "eval_result",
  "enable_query_log", "disable_query_log",
  "enable_result_log", "disable_result_log",
  "server_start", "server_stop",
  "require_manager",
  0
@@ -2060,8 +2062,11 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
    goto end;
  }

  if (!res) goto end;
  if (!res)
    goto end;

  if (!disable_result_log)
  {
    fields =  mysql_fetch_fields(res);
    num_fields =	mysql_num_fields(res);
    for (i = 0; i < num_fields; i++)
@@ -2073,7 +2078,6 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)

    dynstr_append_mem(ds, "\n", 1);


    while ((row = mysql_fetch_row(res)))
    {
      lengths = mysql_fetch_lengths(res);
@@ -2092,12 +2096,11 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
	  dynstr_append_mem(ds, "\t", 1);
	replace_dynstr_append_mem(ds, val, len);
      }

      dynstr_append_mem(ds, "\n", 1);
    }
    if (glob_replace)
      free_replace();

  }
  if (record)
  {
    if (!q->record_file[0] && !result_file)
@@ -2111,7 +2114,8 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
  }

end:
  if (res) mysql_free_result(res);
  if (res)
    mysql_free_result(res);
  last_result=0;
  if (ds == &ds_tmp)
    dynstr_free(&ds_tmp);
@@ -2292,6 +2296,8 @@ int main(int argc, char** argv)
      case Q_DISABLE_RPL_PARSE:  do_disable_rpl_parse(q); break;
      case Q_ENABLE_QUERY_LOG:   disable_query_log=0; break;
      case Q_DISABLE_QUERY_LOG:  disable_query_log=1; break;
      case Q_ENABLE_RESULT_LOG:  disable_result_log=0; break;
      case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
      case Q_SOURCE: do_source(q); break;
      case Q_SLEEP: do_sleep(q); break;
      case Q_REQUIRE_MANAGER: do_require_manager(q); break;
+1 −0
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_STRPBRK
#define HAVE_STRSTR
#define HAVE_COMPRESS
#define HAVE_CREATESEMAPHORE

#ifdef NOT_USED
#define HAVE_SNPRINTF		/* Gave link error */
Loading