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

Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned...

Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc)
Removed thread marking of safemalloc blocks (becasue of alignment problems)
Temporary fix for bigint comparison.
parent 339be73c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -485,3 +485,9 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
sql-bench/innotest1
sql-bench/innotest1a
sql-bench/innotest1b
sql-bench/innotest2
sql-bench/innotest2a
sql-bench/innotest2b
+1 −0
Original line number Diff line number Diff line
@@ -1463,6 +1463,7 @@ install the static libraries and try again. If this isn't the problem,
examine config.log for possible errors.  If you want to report this, use
'scripts/mysqlbug' and include at least the last 20 rows from config.log!])
fi
AC_CHECK_SIZEOF(char*, 4)
AC_CHECK_SIZEOF(int, 4)
if test "$ac_cv_sizeof_int" -eq 0
then
+2 −3
Original line number Diff line number Diff line
@@ -3229,10 +3229,9 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t2	0	PRIMARY	1	auto	A	1199	NULL	NULL		BTREE	
t2	0	fld1	1	fld1	A	1199	NULL	NULL		BTREE	
t2	1	fld3	1	fld3	A	NULL	NULL	NULL		BTREE	
drop table t4, t3, t2, t1;
DO 1;
DO benchmark(100,1+1),1,1;
drop table t4, t3,t2, t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (gvid int(10) unsigned default NULL,  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  mmid int(10) unsigned default NULL,  hdid int(10) unsigned default NULL,  fsid int(10) unsigned default NULL,  ctid int(10) unsigned default NULL,  dtid int(10) unsigned default NULL,  cost int(10) unsigned default NULL,  performance int(10) unsigned default NULL,  serialnumber bigint(20) unsigned default NULL,  monitored tinyint(3) unsigned default '1',  removed tinyint(3) unsigned default '0',  target tinyint(3) unsigned default '0',  dt_modified timestamp(14) NOT NULL,  name varchar(255) binary default NULL,  description varchar(255) default NULL,  UNIQUE KEY hmid (hmid,volid)) TYPE=MyISAM;
INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
CREATE TABLE t2 (  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  sampletid smallint(5) unsigned default NULL,  sampletime datetime default NULL,  samplevalue bigint(20) unsigned default NULL,  KEY idx1 (hmid,volid,sampletid,sampletime)) TYPE=MyISAM;
+9 −4
Original line number Diff line number Diff line
@@ -1712,6 +1712,8 @@ show full columns from t2 from test like 'f%';
show full columns from t2 from test like 's%';
show keys from t2;

drop table t4, t3, t2, t1;

#
# Test of DO

@@ -1719,17 +1721,20 @@ DO 1;
DO benchmark(100,1+1),1,1;

#
# Drop the test tables
# Test of bug with SUM(CASE...)
#

drop table t4, t3,t2, t1;
DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (gvid int(10) unsigned default NULL,  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  mmid int(10) unsigned default NULL,  hdid int(10) unsigned default NULL,  fsid int(10) unsigned default NULL,  ctid int(10) unsigned default NULL,  dtid int(10) unsigned default NULL,  cost int(10) unsigned default NULL,  performance int(10) unsigned default NULL,  serialnumber bigint(20) unsigned default NULL,  monitored tinyint(3) unsigned default '1',  removed tinyint(3) unsigned default '0',  target tinyint(3) unsigned default '0',  dt_modified timestamp(14) NOT NULL,  name varchar(255) binary default NULL,  description varchar(255) default NULL,  UNIQUE KEY hmid (hmid,volid)) TYPE=MyISAM;
INSERT INTO t1 VALUES (200001,2,1,1,100,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\E$',''),(200002,2,2,1,101,1,1,1,0,0,0,1,0,1,20020425060057,'\\\\ARKIVIO-TESTPDC\\C$',''),(200003,1,3,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,20020425060427,'c:',NULL);
CREATE TABLE t2 (  hmid int(10) unsigned default NULL,  volid int(10) unsigned default NULL,  sampletid smallint(5) unsigned default NULL,  sampletime datetime default NULL,  samplevalue bigint(20) unsigned default NULL,  KEY idx1 (hmid,volid,sampletid,sampletime)) TYPE=MyISAM;
INSERT INTO t2 VALUES (1,3,10,'2002-06-01 08:00:00',35),(1,3,1010,'2002-06-01 12:00:01',35);
SELECT a.gvid, (SUM(CASE b.sampletid WHEN 140 THEN b.samplevalue ELSE 0 END)) as the_success,(SUM(CASE b.sampletid WHEN 141 THEN b.samplevalue ELSE 0 END)) as the_fail,(SUM(CASE b.sampletid WHEN 142 THEN b.samplevalue ELSE 0 END)) as the_size,(SUM(CASE b.sampletid WHEN 143 THEN b.samplevalue ELSE 0 END)) as the_time FROM t1 a, t2 b WHERE a.hmid = b.hmid AND a.volid = b.volid AND b.sampletime >= 'NULL' AND b.sampletime < 'NULL' AND b.sampletid IN (140, 141, 142, 143) GROUP BY a.gvid;
DROP TABLE t1,t2;

#
# Test of bigint comparision
#

create table  t1 (  A_Id bigint(20) NOT NULL default '0',  A_UpdateBy char(10) NOT NULL default '',  A_UpdateDate bigint(20) NOT NULL default '0',  A_UpdateSerial int(11) NOT NULL default '0',  other_types bigint(20) NOT NULL default '0',  wss_type bigint(20) NOT NULL default '0');
INSERT INTO t1 VALUES (102935998719055004,'brade',1029359987,2,102935229116544068,102935229216544093);
select wss_type from t1 where wss_type ='102935229216544106';
+15 −17
Original line number Diff line number Diff line
@@ -32,14 +32,20 @@ struct st_remember {
  sig_handler (*func)(int number);
};

struct irem {
/*
  The size of the following structure MUST be dividable by 8 to not cause
  alignment problems on some cpu's
*/

struct irem
{
  struct remember *_pNext;	/* Linked list of structures	   */
  struct remember *_pPrev;	/* Other link			   */
    my_string _sFileName;		/* File in which memory was new'ed */
    uint _uLineNum;			/* Line number in above file	   */
    uint _uDataSize;			/* Size requested		   */
#ifdef THREAD
    pthread_t thread_id;
  char *_sFileName;		/* File in which memory was new'ed */
  uint32 _uLineNum;		/* Line number in above file	   */
  uint32 _uDataSize;		/* Size requested		   */
#if SIZEOF_CHARP == 8
  long _filler;			/* For alignment */
#endif
  long _lSpecialValue;		/* Underrun marker value	   */
};
@@ -59,14 +65,6 @@ extern const char *soundex_map;
extern USED_MEM* my_once_root_block;
extern uint	 my_once_extra;

#ifdef THREAD
/*
  These threads are exempt from safemalloc leak scrutiny unless
  PEDANTIC_SAFEMALLOC is defined
*/
extern pthread_t signal_th, kill_th, main_th;
#endif

#ifndef HAVE_TEMPNAM
extern int	_my_tempnam_used;
#endif
Loading