Commit ae3dd78b authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/my/mysql-4.1


sql/sql_base.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
parents 52df5f5b 07f5a44b
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -153,14 +153,14 @@ sub fix_mysql_version
  chdir("$destdir");
  my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h';

    open(MYSQL_VERSION,"<$header_file") or die "Unable to open include/mysql_version.h for read: $!\n";
  open(MYSQL_VERSION,"<$header_file") or die "Unable to open $header_file for read: $!\n";
  undef $/;
  my $mysql_version= <MYSQL_VERSION>;
  close(MYSQL_VERSION);

  $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/;

    open(MYSQL_VERSION,">$header_file") or die "Unable to open include/mysql_version.h for write: $!\n";
  open(MYSQL_VERSION,">$header_file") or die "Unable to open $header_file for write: $!\n";
  print MYSQL_VERSION $mysql_version;
  close(MYSQL_VERSION);
  chdir("$cwd");
+0 −2
Original line number Diff line number Diff line
@@ -151,9 +151,7 @@ typedef uint rf_SetTimer;
#endif

/* ERROR is defined in wingdi.h */
#ifdef ERROR
#undef ERROR
#endif 

/* We need to close files to break connections on shutdown */
#ifndef SIGNAL_WITH_VIO_CLOSE
+14 −14
Original line number Diff line number Diff line
@@ -34,14 +34,17 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
{
  int save_errno,errpos=0;
  uint files=0,i,dir_length,length,key_parts;
  ulonglong file_offset;
  ulonglong file_offset=0;
  char name_buff[FN_REFLEN*2],buff[FN_REFLEN],*end;
  MYRG_INFO *m_info=0;
  File fd;
  IO_CACHE file;
  MI_INFO *isam=0;
  uint found_merge_insert_method= 0;
  DBUG_ENTER("myrg_open");

  LINT_INIT(key_parts);

  bzero((char*) &file,sizeof(file));
  if ((fd=my_open(fn_format(name_buff,name,"",MYRG_NAME_EXT,4),
		  O_RDONLY | O_SHARE,MYF(0))) < 0)
@@ -72,7 +75,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
      if (!strncmp(buff+1,"INSERT_METHOD=",14))
      {			/* Lookup insert method */
	int tmp=find_type(buff+15,&merge_insert_method,2);
	m_info->merge_insert_method = (uint) (tmp >= 0 ? tmp : 0);
	found_merge_insert_method = (uint) (tmp >= 0 ? tmp : 0);
      }
      continue;		/* Skip comments */
    }
@@ -85,7 +88,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
    }
    if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0))))
      goto err;
    if (!m_info)
    if (!m_info)                                /* First file */
    {
      key_parts=isam->s->base.key_parts;
      if (!(m_info= (MYRG_INFO*) my_malloc(sizeof(MYRG_INFO) +
@@ -97,15 +100,10 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
      {
        m_info->open_tables=(MYRG_TABLE *) (m_info+1);
        m_info->rec_per_key_part=(ulong *) (m_info->open_tables+files);
      }
      else
      {
        m_info->open_tables=0;
        m_info->rec_per_key_part=0;
      }
        m_info->tables= files;
        files= 0;
      }
      m_info->reclength=isam->s->base.reclength;
      file_offset=files=0;
      errpos=3;
    }
    m_info->open_tables[files].table= isam;
@@ -122,7 +120,8 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
    m_info->del+= isam->state->del;
    m_info->data_file_length+= isam->state->data_file_length;
    for (i=0; i < key_parts; i++)
      m_info->rec_per_key_part[i]+=isam->s->state.rec_per_key_part[i] / m_info->tables;
      m_info->rec_per_key_part[i]+= (isam->s->state.rec_per_key_part[i] /
                                     m_info->tables);
  }

  if (!m_info && !(m_info= (MYRG_INFO*) my_malloc(sizeof(MYRG_INFO),
@@ -130,6 +129,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking)
    goto err;
  /* Don't mark table readonly, for ALTER TABLE ... UNION=(...) to work */
  m_info->options&= ~(HA_OPTION_COMPRESS_RECORD | HA_OPTION_READ_ONLY_DATA);
  m_info->merge_insert_method= found_merge_insert_method;

  if (sizeof(my_off_t) == 4 && file_offset > (ulonglong) (ulong) ~0L)
  {
+19 −19
Original line number Diff line number Diff line
drop table if exists t1,t2,t3;
drop database if exists test_$1;
drop database if exists mysqltest;
create table t1 (b char(0));
insert into t1 values (""),(null);
select * from t1;
@@ -58,18 +58,18 @@ select 1ea10.1a20,1e+ 1e+10 from 1ea10;
drop table 1ea10;
create table t1 (t1.index int);
drop table t1;
drop database if exists test_$1;
drop database if exists mysqltest;
Warnings:
Note	1008	Can't drop database 'test_$1'; database doesn't exist
create database test_$1;
create table test_$1.$test1 (a$1 int, $b int, c$ int);
insert into test_$1.$test1 values (1,2,3);
select a$1, $b, c$ from test_$1.$test1;
Note	1008	Can't drop database 'mysqltest'; database doesn't exist
create database mysqltest;
create table mysqltest.$test1 (a$1 int, $b int, c$ int);
insert into mysqltest.$test1 values (1,2,3);
select a$1, $b, c$ from mysqltest.$test1;
a$1	$b	c$
1	2	3
create table test_$1.test2$ (a int);
drop table test_$1.test2$;
drop database test_$1;
create table mysqltest.test2$ (a int);
drop table mysqltest.test2$;
drop database mysqltest;
create table `` (a int);
ERROR 42000: Incorrect table name ''
drop table if exists ``;
@@ -320,9 +320,9 @@ t3 CREATE TABLE `t3` (
select * from t3;
id	name
drop table t2, t3;
create database test_$1;
create table test_$1.t3 like t1;
create temporary table t3 like test_$1.t3;
create database mysqltest;
create table mysqltest.t3 like t1;
create temporary table t3 like mysqltest.t3;
show create table t3;
Table	Create Table
t3	CREATE TEMPORARY TABLE `t3` (
@@ -339,7 +339,7 @@ t2 CREATE TABLE `t2` (
select * from t2;
id	name
create table t3 like t1;
create table t3 like test_$1.t3;
create table t3 like mysqltest.t3;
ERROR 42S01: Table 't3' already exists
create table non_existing_database.t1 like t1;
Got one of the listed errors
@@ -351,7 +351,7 @@ create table t3 like `a/a`;
ERROR 42000: Incorrect table name 'a/a'
drop table t1, t2, t3;
drop table t3;
drop database test_$1;
drop database mysqltest;
SET SESSION storage_engine="heap";
SELECT @@storage_engine;
@@storage_engine
@@ -488,12 +488,12 @@ Note 1291 Column 'cset' has duplicated value 'b' in SET
Note	1291	Column 'cset' has duplicated value 'B' in SET
Note	1291	Column 'cset' has duplicated value 'd' in SET
drop table t1, t2, t3;
create database test_$1;
use test_$1;
create database mysqltest;
use mysqltest;
select database();
database()
test_$1
drop database test_$1;
mysqltest
drop database mysqltest;
select database();
database()
NULL
+4 −4
Original line number Diff line number Diff line
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
drop database if exists test2;
drop database if exists mysqltest;
CREATE TABLE t1 (
pk1 INT NOT NULL PRIMARY KEY,
attr1 INT NOT NULL,
@@ -1362,8 +1362,8 @@ attr2 INT,
attr3 VARCHAR(10)
) ENGINE=ndbcluster;
INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
create database test2;
use test2;
create database mysqltest;
use mysqltest;
CREATE TABLE t2 (
a bigint unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -1381,4 +1381,4 @@ select b,test.t1.attr1 from test.t1, t2 where test.t1.pk1 < a;
b	attr1
9413	9412
drop table test.t1, t2;
drop database test2;
drop database mysqltest;
Loading