Commit 6698292d authored by unknown's avatar unknown

Merge akeremidarski@work.mysql.com:/home/bk/mysql

into geopard.(none):/storage/bk/mysql-3.23
parents b2cd66ec c0e3d59b
......@@ -381,13 +381,15 @@ if ($opt_stage <= 9 && !$opt_no_test)
log_system("rm -f output/*");
$tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : "";
check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql");
# Run additional fast test with dynamic-row tables
check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql");
if ($opt_innodb)
{
check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-option=\"type=innodb\"","RUN-mysql");
check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql");
}
if ($opt_bdb)
{
check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-option=\"type=bdb\"","RUN-mysql");
check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql");
}
}
......
......@@ -47012,6 +47012,11 @@ Changed initialisation of @code{RND()} to make it less predicatable.
Fixed problem with @code{GROUP BY} on result with expression that created a
@code{BLOB} field.
@item
Fixed problem with @code{GROUP BY} on columns that have NULL values. To
solve this we now create an MyISAM temporary table when doing a group by
on a possible NULL item. In MySQL 4.0.5 we can again use in memory HEAP
tables for this case.
@item
Fixed problem with privilege tables when downgrading from 4.0.2 to 3.23.
@item
Fixed thread bug in @code{SLAVE START}, @code{SLAVE STOP} and automatic repair
......@@ -14,9 +14,8 @@ the InnoDB parser.
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
#include <math.h>
#include "univ.i"
#include <math.h>
#include "pars0pars.h"
#include "mem0mem.h"
#include "que0types.h"
......
......@@ -495,7 +495,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
extra=ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER;
tmp_length=max(share->base.pack_reclength,share->base.max_key_length);
tmp_length=max(share->base.pack_reclength+share->base.pack_bits,
share->base.max_key_length);
info.alloced_rec_buff_length=tmp_length;
if (!(info.rec_alloc=(byte*) my_malloc(tmp_length+extra+8,
MYF(MY_WME | MY_ZEROFILL))))
......
This diff is collapsed.
......@@ -533,6 +533,7 @@ class Field_timestamp :public Field_num {
enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; }
enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
enum Item_result cmp_type () const { return INT_RESULT; }
void store(const char *to,uint length);
void store(double nr);
void store(longlong nr);
......
......@@ -993,7 +993,10 @@ how you can resolve the problem.\n",
((row_prebuilt_t*)innobase_prebuilt)->mysql_row_len = table->reclength;
primary_key = MAX_KEY;
/* Looks like MySQL-3.23 sometimes has primary key number != 0 */
primary_key = table->primary_key;
key_used_on_scan = primary_key;
/* Allocate a buffer for a 'row reference'. A row reference is
a string of bytes of length ref_length which uniquely specifies
......@@ -1002,21 +1005,30 @@ how you can resolve the problem.\n",
of length ref_length! */
if (!row_table_got_default_clust_index(ib_table)) {
if (primary_key >= MAX_KEY) {
fprintf(stderr,
"InnoDB: Error: table %s has a primary key in InnoDB\n"
"InnoDB: data dictionary, but not in MySQL!\n", name);
}
((row_prebuilt_t*)innobase_prebuilt)
->clust_index_was_generated = FALSE;
primary_key = 0;
key_used_on_scan = 0;
/* MySQL allocates the buffer for ref. key_info->key_length
includes space for all key columns + one byte for each column
that may be NULL. ref_length must be as exact as possible to
save space, because all row reference buffers are allocated
based on ref_length. */
ref_length = table->key_info->key_length;
/*
MySQL allocates the buffer for ref. key_info->key_length
includes space for all key columns + one byte for each column
that may be NULL. ref_length must be as exact as possible to
save space, because all row reference buffers are allocated
based on ref_length.
*/
ref_length = table->key_info[primary_key].key_length;
} else {
if (primary_key != MAX_KEY) {
fprintf(stderr,
"InnoDB: Error: table %s has no primary key in InnoDB\n"
"InnoDB: data dictionary, but has one in MySQL!\n", name);
}
((row_prebuilt_t*)innobase_prebuilt)
->clust_index_was_generated = TRUE;
......
......@@ -354,6 +354,7 @@ void Item_func_between::fix_length_and_dec()
if (args[0]->type() == FIELD_ITEM)
{
Field *field=((Item_field*) args[0])->field;
cmp_type=field->cmp_type();
if (field->store_for_compare())
{
if (convert_constant_item(field,&args[1]))
......
......@@ -251,7 +251,7 @@ extern int init_master_info(MASTER_INFO* mi);
// and are treated as aliases for each other
static bool kill_in_progress=FALSE;
static struct rand_struct sql_rand;
struct rand_struct sql_rand; // used by sql_class.cc:THD::THD()
static int cleanup_done;
static char **defaults_argv,time_zone[30];
static const char *default_table_type_name;
......@@ -2323,15 +2323,7 @@ static void create_new_thread(THD *thd)
for (uint i=0; i < 8 ; i++) // Generate password teststring
thd->scramble[i]= (char) (rnd(&sql_rand)*94+33);
thd->scramble[8]=0;
/*
We need good random number initialization for new thread
Just coping global one will not work
*/
{
ulong tmp=(ulong) (rnd(&sql_rand) * 3000000);
randominit(&(thd->rand), tmp + (ulong) start_time,
tmp + (ulong) thread_id);
}
thd->real_id=pthread_self(); // Keep purify happy
/* Start a new thread to handle connection */
......
......@@ -35,6 +35,8 @@
#include <io.h>
#endif
extern struct rand_struct sql_rand;
/*****************************************************************************
** Instansiate templates
*****************************************************************************/
......@@ -147,6 +149,18 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
transaction.trans_log.end_of_file= max_binlog_cache_size;
}
#endif
/*
We need good random number initialization for new thread
Just coping global one will not work
*/
{
pthread_mutex_lock(&LOCK_thread_count);
ulong tmp=(ulong) (rnd(&sql_rand) * 3000000);
randominit(&rand, tmp + (ulong) start_time,
tmp + (ulong) thread_id);
pthread_mutex_unlock(&LOCK_thread_count);
}
}
/* Do operations that may take a long time */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment