MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonathan Miller Date:October 30 2006 8:52pm
Subject:bk commit into 5.1 tree (jmiller:1.2331)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-10-30 21:52:45+01:00, jmiller@stripped +2 -0
  New INFORMATION_SCHEMA.FILES test case

  mysql-test/r/ndb_info_schema_files.result@stripped, 2006-10-30 21:52:02+01:00, jmiller@stripped +163 -0
    New result file for ndb INFORMATION_SCHEMA.FILES

  mysql-test/r/ndb_info_schema_files.result@stripped, 2006-10-30 21:52:02+01:00, jmiller@stripped +0 -0

  mysql-test/t/ndb_info_schema_files.test@stripped, 2006-10-30 21:51:35+01:00, jmiller@stripped +197 -0
    New test case for ndb INFORMATION_SCHEMA.FILES

  mysql-test/t/ndb_info_schema_files.test@stripped, 2006-10-30 21:51:35+01:00, jmiller@stripped +0 -0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jmiller
# Host:	ndb08.mysql.com
# Root:	/data1/mysql-5.1-new-ndb
--- New file ---
+++ mysql-test/r/ndb_info_schema_files.result	06/10/30 21:52:02
DROP TABLE IF EXISTS t1;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;
ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M 
ENGINE=NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5223944	NULL	4	NULL
CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 2M
ENGINE NDB;
ALTER TABLESPACE ts1
ADD DATAFILE 'datafile02.dat'
INITIAL_SIZE = 8M 
ENGINE=NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free, 
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	8	8	1048576	8388608
datafile.dat	2	2	1048576	2097152
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5223944	NULL	4	NULL
CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	8	8	1048576	8388608
datafile.dat	2	2	1048576	2097152
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5215756	NULL	4	NULL
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `pk1` int(11) NOT NULL,
  `b` int(11) NOT NULL,
  `c` int(11) NOT NULL,
  PRIMARY KEY (`pk1`)
) /*!50100 TABLESPACE ts1 STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	6	8	1048576	8388608
datafile.dat	2	2	1048576	2097152
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5214721	NULL	4	NULL
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile02.dat';
bytes_used
2097152
CREATE TABLE t2 (
a INT NOT NULL PRIMARY KEY,
b TEXT NOT NULL
) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;
CREATE TABLE t3
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;
INSERT INTO t3 SELECT * FROM t1;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	4	8	1048576	8388608
datafile.dat	2	2	1048576	2097152
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5206533	NULL	4	NULL
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile02.dat';
bytes_used_data02
4194304
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile.dat';
bytes_used_datafile
0
DROP TABLE t2;
DROP TABLE t3;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	6	8	1048576	8388608
datafile.dat	2	2	1048576	2097152
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5206533	NULL	4	NULL
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile02.dat';
bytes_used_data02
2097152
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile.dat';
bytes_used_datafile
0
DROP TABLE t1;
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile02.dat';
bytes_used_data02
0
SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
FROM INFORMATION_SCHEMA.FILES
WHERE FILE_NAME = 'datafile.dat';
bytes_used_datafile
0
ALTER TABLESPACE ts1 
DROP DATAFILE 'datafile.dat' 
ENGINE = NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
datafile02.dat	8	8	1048576	8388608
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5206533	NULL	4	NULL
ALTER TABLESPACE ts1 
DROP DATAFILE 'datafile02.dat' 
ENGINE = NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size
undofile.dat	NULL	4194304	4	16777216
undofile02.dat	NULL	1048576	4	4194304
NULL	5206533	NULL	4	NULL
DROP TABLESPACE ts1 
ENGINE = NDB;
DROP LOGFILE GROUP lg1 
ENGINE =NDB;
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;
Name	Free	Total	Size	Int_Size

--- New file ---
+++ mysql-test/t/ndb_info_schema_files.test	06/10/30 21:51:35
#################################
# Author: JBM
# Org Date: 10/25/2006
# Purpose: To test Cluster INFORMATION_SCHEMA.FILES 
#################################

-- source include/have_ndb.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

##################################
# Basic test of disk tables for NDB
# Start by creating a logfile group
##################################
SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;

ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE = 4M 
ENGINE=NDB;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

###################################################
# Create a tablespace connected to the logfile group
###################################################

CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1
INITIAL_SIZE 2M
ENGINE NDB;

ALTER TABLESPACE ts1
ADD DATAFILE 'datafile02.dat'
INITIAL_SIZE = 8M 
ENGINE=NDB;

########################################
# Create a table using this tablespace
########################################

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free, 
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

CREATE TABLE t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

SHOW CREATE TABLE t1;

--disable_query_log
let $1=345;
while ($1)
{ 
  eval INSERT INTO t1 VALUES($1,$1,$1);
  dec $1;
} 
--enable_query_log

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile02.dat';    

CREATE TABLE t2 (
  a INT NOT NULL PRIMARY KEY,
  b TEXT NOT NULL
) TABLESPACE ts1 STORAGE DISK ENGINE=NDBCLUSTER;

--disable_query_log
# b1 length 2000+256 (blob part aligned)
#########################################
set @x0 = '01234567012345670123456701234567';
set @x0 = concat(@x0,@x0,@x0,@x0,@x0,@x0,@x0,@x0);
set @b1 = 'b1';
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1,@b1);
set @b1 = concat(@b1,@x0);
# b2 length 20000
##########################################
set @b2 = 'b2';
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);
set @b2 = concat(@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2,@b2);


let $1=36;
while ($1)
{
  eval INSERT INTO t2 VALUES($1,@b1);
  dec $1;
  eval INSERT INTO t2 VALUES($1,@b2);
  dec $1;
}
--enable_query_log


CREATE TABLE t3
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;

INSERT INTO t3 SELECT * FROM t1;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile02.dat';

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile.dat';


DROP TABLE t2;
DROP TABLE t3;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile02.dat';

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile.dat';


###################
# Test Cleanup
###################
DROP TABLE t1;

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_data02
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile02.dat';

SELECT DISTINCT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used_datafile
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'datafile.dat';

ALTER TABLESPACE ts1 
DROP DATAFILE 'datafile.dat' 
ENGINE = NDB;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

ALTER TABLESPACE ts1 
DROP DATAFILE 'datafile02.dat' 
ENGINE = NDB;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;

DROP TABLESPACE ts1 
ENGINE = NDB;

DROP LOGFILE GROUP lg1 
ENGINE =NDB;

SELECT DISTINCT FILE_NAME as Name, FREE_EXTENTS as Free,
                TOTAL_EXTENTS as Total, EXTENT_SIZE as Size,
                INITIAL_SIZE as Int_Size FROM INFORMATION_SCHEMA.FILES;


#End 5.1 test case

Thread
bk commit into 5.1 tree (jmiller:1.2331)Jonathan Miller30 Oct