Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9ce98dd1
Commit
9ce98dd1
authored
Dec 09, 2008
by
Horst Hunger
Browse files
Options
Browse Files
Download
Plain Diff
due to merge
parents
6e96dd31
22b70190
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
147 additions
and
622 deletions
+147
-622
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+16
-0
mysql-test/r/type_bit.result
mysql-test/r/type_bit.result
+26
-0
mysql-test/suite/funcs_2/t/disabled.def
mysql-test/suite/funcs_2/t/disabled.def
+4
-4
mysql-test/suite/ndb/t/disabled.def
mysql-test/suite/ndb/t/disabled.def
+1
-2
mysql-test/suite/parts/r/partition_bit_innodb.result
mysql-test/suite/parts/r/partition_bit_innodb.result
+9
-9
mysql-test/suite/parts/r/partition_bit_myisam.result
mysql-test/suite/parts/r/partition_bit_myisam.result
+9
-9
mysql-test/suite/parts/r/partition_bit_ndb.result
mysql-test/suite/parts/r/partition_bit_ndb.result
+0
-126
mysql-test/suite/parts/t/disabled.def
mysql-test/suite/parts/t/disabled.def
+0
-5
mysql-test/suite/parts/t/partition_bit_ndb.test
mysql-test/suite/parts/t/partition_bit_ndb.test
+0
-60
mysql-test/suite/parts/t/partition_sessions.test
mysql-test/suite/parts/t/partition_sessions.test
+0
-391
mysql-test/suite/parts/t/partition_value_innodb.test
mysql-test/suite/parts/t/partition_value_innodb.test
+9
-3
mysql-test/suite/parts/t/partition_value_myisam.test
mysql-test/suite/parts/t/partition_value_myisam.test
+9
-3
mysql-test/suite/parts/t/partition_value_ndb.test
mysql-test/suite/parts/t/partition_value_ndb.test
+9
-3
mysql-test/suite/rpl_ndb/t/disabled.def
mysql-test/suite/rpl_ndb/t/disabled.def
+2
-2
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+13
-0
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
mysql-test/t/type_bit.test
mysql-test/t/type_bit.test
+30
-0
sql/sql_select.cc
sql/sql_select.cc
+6
-2
sql/sql_table.cc
sql/sql_table.cc
+4
-2
No files found.
mysql-test/r/alter_table.result
View file @
9ce98dd1
...
...
@@ -996,6 +996,22 @@ SELECT * FROM t1;
v b
abc 5
DROP TABLE t1;
create table t1 (a tinytext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` text
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
create table t1 (a mediumtext character set latin1);
alter table t1 convert to character set utf8;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` longtext
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
End of 5.0 tests
drop table if exists t1, t2, t3;
create table t1 (i int);
...
...
mysql-test/r/type_bit.result
View file @
9ce98dd1
...
...
@@ -723,6 +723,32 @@ CREATE TABLE IF NOT EXISTS t1 (
f1 bit(2) NOT NULL default b''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
ERROR 42000: Invalid default value for 'f1'
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
create table t2bit7 (b1 bit(7)) engine=MyISAM;
insert into t1bit7 values (b'1100000');
insert into t1bit7 values (b'1100001');
insert into t1bit7 values (b'1100010');
insert into t2bit7 values (b'1100001');
insert into t2bit7 values (b'1100010');
insert into t2bit7 values (b'1100110');
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
bin(a1)
1100001
1100010
drop table t1bit7, t2bit7;
create table t1bit7 (a1 bit(15) not null) engine=MyISAM;
create table t2bit7 (b1 bit(15)) engine=MyISAM;
insert into t1bit7 values (b'110000011111111');
insert into t1bit7 values (b'110000111111111');
insert into t1bit7 values (b'110001011111111');
insert into t2bit7 values (b'110000111111111');
insert into t2bit7 values (b'110001011111111');
insert into t2bit7 values (b'110011011111111');
select bin(a1) from t1bit7, t2bit7 where t1bit7.a1=t2bit7.b1;
bin(a1)
110000111111111
110001011111111
drop table t1bit7, t2bit7;
End of 5.0 tests
create table t1(a bit(7));
insert into t1 values(0x40);
...
...
mysql-test/suite/funcs_2/t/disabled.def
View file @
9ce98dd1
# Disabled by hhunger (2008-03-03) due to WL4204
innodb_charset :
Due to bug#20447
myisam_charset :
Due to bug#20477
memory_charset :
Due to bug#20447
ndb_charset :
Due to bug#20447
innodb_charset :
Bug#20447 Problem with prefix keys with contractions and expansions
myisam_charset :
Bug#20447 Problem with prefix keys with contractions and expansions
memory_charset :
Bug#20447 Problem with prefix keys with contractions and expansions
ndb_charset :
Bug#20447 Problem with prefix keys with contractions and expansions
mysql-test/suite/ndb/t/disabled.def
View file @
9ce98dd1
...
...
@@ -9,8 +9,7 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
ndb_partition_error2
: HF is not sure if the test can work as internded on all the platforms
ndb_partition_error2
: Bug#40989 ndb_partition_error2 needs maintenance
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
mysql-test/suite/parts/r/partition_bit_innodb.result
View file @
9ce98dd1
...
...
@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='INNODB' partition by key (a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
...
...
@@ -18,7 +18,7 @@ partition pa2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT
'\0\0\0\0\0\0\0\
0',
`a` bit(64) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT
'\0\0\0\0\0\0\0\
0',
`a` bit(64) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -102,7 +102,7 @@ alter table t2 drop primary key;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0'
`a` bit(1) NOT NULL DEFAULT
b'
0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
PARTITIONS 4 */
...
...
@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -133,7 +133,7 @@ partition pa4 values less than (256));
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` bit(8) NOT NULL DEFAULT
'\
0',
`a` bit(8) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a)
...
...
@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` bit(8) NOT NULL DEFAULT
'\
0',
`a` bit(8) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a)
...
...
mysql-test/suite/parts/r/partition_bit_myisam.result
View file @
9ce98dd1
...
...
@@ -6,7 +6,7 @@ create table t1 (a bit(0), primary key (a)) engine='MyISAM' partition by key (a)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
...
...
@@ -18,7 +18,7 @@ partition pa2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -30,7 +30,7 @@ partition by key (a) partitions 2;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT
'\0\0\0\0\0\0\0\
0',
`a` bit(64) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -58,7 +58,7 @@ partition pa4 max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT
'\0\0\0\0\0\0\0\
0',
`a` bit(64) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -88,7 +88,7 @@ partition by key (a) partitions 4;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -102,7 +102,7 @@ alter table t2 drop primary key;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0'
`a` bit(1) NOT NULL DEFAULT
b'
0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
PARTITIONS 4 */
...
...
@@ -114,7 +114,7 @@ alter table t2 add primary key (a);
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` bit(1) NOT NULL DEFAULT
'\
0',
`a` bit(1) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a)
...
...
@@ -133,7 +133,7 @@ partition pa4 values less than (256));
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`a` bit(8) NOT NULL DEFAULT
'\
0',
`a` bit(8) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (a)
...
...
@@ -416,7 +416,7 @@ partition pa3 values in (17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32));
show create table t4;
Table Create Table
t4 CREATE TABLE `t4` (
`a` bit(8) NOT NULL DEFAULT
'\
0',
`a` bit(8) NOT NULL DEFAULT
b'
0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (a)
...
...
mysql-test/suite/parts/r/partition_bit_ndb.result
deleted
100644 → 0
View file @
6e96dd31
SET @max_row = 20;
create table t1 (a bit(65), primary key (a)) partition by key (a);
ERROR 42000: Display width out of range for column 'a' (max = 64)
create table t1 (a bit(0), primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
drop table t1;
create table t1 (a bit(0), primary key (a)) partition by key (a) (
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp',
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
/*!50100 PARTITION BY KEY (a)
(PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
drop table t1;
create table t1 (a bit(64), primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
(b'0000000000000000000000000000000000000000000000000000000000000001'),
(b'1010101010101010101010101010101010101010101010101010101010101010'),
(b'0101010101010101010101010101010101010101010101010101010101010101');
select hex(a) from t1;
hex(a)
1
5555555555555555
8000000000000000
AAAAAAAAAAAAAAAA
FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit(64), primary key (a)) partition by key (a)(
partition pa1 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=20 min_rows=2,
partition pa2 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=3,
partition pa3 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=30 min_rows=4,
partition pa4 DATA DIRECTORY =
'/tmp' INDEX DIRECTORY =
'/tmp' max_rows=40 min_rows=2);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/tmp/' INDEX DIRECTORY='/tmp/'
/*!50100 PARTITION BY KEY (a)
(PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM,
PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
insert into t1 values
(b'1111111111111111111111111111111111111111111111111111111111111111'),
(b'1000000000000000000000000000000000000000000000000000000000000000'),
(b'0000000000000000000000000000000000000000000000000000000000000001'),
(b'1010101010101010101010101010101010101010101010101010101010101010'),
(b'0101010101010101010101010101010101010101010101010101010101010101');
select hex(a) from t1;
hex(a)
1
5555555555555555
8000000000000000
AAAAAAAAAAAAAAAA
FFFFFFFFFFFFFFFF
drop table t1;
create table t1 (a bit, primary key (a)) partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
insert into t1 values (b'0'), (b'1');
select hex(a) from t1;
hex(a)
0
1
alter table t1 drop primary key;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
select hex(a) from t1;
hex(a)
0
1
alter table t1 add primary key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bit(1) NOT NULL DEFAULT '\0',
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
select hex(a) from t1;
hex(a)
0
1
drop table t1;
mysql-test/suite/parts/t/disabled.def
View file @
9ce98dd1
partition_basic_ndb : Bug#19899 Crashing the server
# http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-syntax.html
partition_bit_ndb : NDB does not support bit column in index
partition_sessions : needs system_3_init.inc
partition_syntax_ndb : Bug#36735 Not supported
partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function
partition_value_ndb : Bug#30581 partition_value tests use disallowed CAST() function
mysql-test/suite/parts/t/partition_bit_ndb.test
deleted
100644 → 0
View file @
6e96dd31
################################################################################
# t/partition_bit_ndb.test #
# #
# Purpose: #
# Tests around bit type #
# NDB branch #
# #
#------------------------------------------------------------------------------#
# Original Author: HH #
# Original Date: 2006-08-01 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
#
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
# THE SOURCED FILES ONLY.
#
# Please read the README at the end of inc/partition.pre before changing
# any of the variables.
#
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
##### Options, for debugging support #####
let
$debug
=
0
;
let
$with_partitioning
=
1
;
##### Option, for displaying files #####
let
$ls
=
1
;
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
# on partioned tables
SET
@
max_row
=
20
;
# The server must support partitioning.
--
source
include
/
have_partition
.
inc
#------------------------------------------------------------------------------#
# Engine specific settings and requirements
##### Storage engine to be tested
--
source
include
/
have_ndb
.
inc
let
$engine
=
'NDB'
;
connection
default
;
# range, list and hash partitioning in ndb requires new_mode
--
disable_query_log
set
new
=
on
;
--
enable_query_log
##### Assign a big number smaller than the maximum value for partitions #####
# and smaller than the maximum value of SIGNED INTEGER
let
$MAX_VALUE
=
(
2147483646
);
#------------------------------------------------------------------------------#
# Execute the tests to be applied to all storage engines
--
source
suite
/
parts
/
inc
/
partition_bit
.
inc
mysql-test/suite/parts/t/partition_sessions.test
deleted
100644 → 0
View file @
6e96dd31
#--------------------------------------------------
# Initialize system_3 test variables
#--------------------------------------------------
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
let
$LOAD_LINES
=
`SELECT @LOAD_LINES`
;
let
$LOG_UPPER
=
`SELECT @LOG_UPPER`
;
let
$LOG_LOWER
=
`SELECT @LOG_LOWER`
;
#let $ENG1=`SELECT @ENG1`;
let
$ENG2
=
`SELECT @ENG2`
;
let
$ENG_LOG
=
`SELECT @ENG_LOG`
;
let
$CLIENT_HOST
=
`SELECT @CLIENT_HOST`
;
let
$ENG
=
innodb
;
let
$ENG1
=
innodb
;
#---------------------------------------------------------
# Column list with definition for all tables to be checked
#---------------------------------------------------------
let
$column_list
=
f1
int
,
f2
char
(
15
),
f3
decimal
(
5
,
3
),
f4
datetime
;
let
$col_access_list
=
f1
,
f2
,
f3
,
f4
;
let
$col_new_list
=
new
.
f1
,
new
.
f2
,
new
.
f3
new
.
f4
;
#---------------------------------------------------
# Setting the parameters to use during testing
#---------------------------------------------------
# Set number of variations of the f1 variable (used to segment the rows
# being updated/deleted by a user at a time. The higher the number, the
# more smaller segments used with each query.
--
replace_result
$NUM_VAL
NUM_VAL
eval
set
@
f1_nums
=
$NUM_VAL
;
# The following sets the number controls the size of the log table.
# Once a size of '@threshold' is reached, the first rows are removed
# sunch that the table is down to '@shrink_to' lines
--
replace_result
$LOG_LOWER
LOG_LOWER
eval
set
@
shrink_to
=
$LOG_LOWER
;
--
replace_result
$LOG_UPPER
LOG_UPPER
eval
set
@
threshold
=
$LOG_UPPER
;
#---------------------------------------------------
# Creating the database tables and loading the data
#---------------------------------------------------
--
disable_warnings
drop
database
if
exists
systest1
;
--
enable_warnings
create
database
systest1
;
--
disable_abort_on_error
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
create
user
systuser
@
'$CLIENT_HOST'
;
--
enable_abort_on_error
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
set
password
for
systuser
@
'$CLIENT_HOST'
=
password
(
'systpass'
);
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
grant
ALL
on
systest1
.*
to
systuser
@
'$CLIENT_HOST'
;
use
systest1
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
$MASTER_MYSOCK
MASTER_MYSOCK
connect
(
systuser
,
localhost
,
systuser
,
systpass
,
systest1
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
create
table
tb1_master
(
f1
int
,
f2
char
(
15
),
f3
decimal
(
5
,
3
),
f4
datetime
);
#--replace_result $ENG_LOG ENG_LOG
eval
create
table
tb1_logs
(
i1
int
NOT
NULL
auto_increment
,
primary
key
(
i1
),
dt1
datetime
NOT
NULL
,
entry_dsc
char
(
100
),
f4
int
)
engine
=
$ENG_LOG
;
#PARTITION BY HASH (i1) PARTITIONS 8;
if
(
$debug
)
{
SHOW
CREATE
TABLE
tb1_logs
;
}
#--replace_result $ENG_LOG ENG_LOG
eval
create
table
ddl_logs
(
i1
int
NOT
NULL
auto_increment
,
primary
key
(
i1
),
dt1
datetime
NOT
NULL
,
entry_dsc
char
(
100
),
errno
int
)
engine
=
$ENG_LOG
;
#PARTITION BY HASH (i1) PARTITIONS 8;
if
(
$debug
)
{
SHOW
CREATE
TABLE
tb1_logs
;
}
create
table
test_stat
(
dt1
datetime
,
table_name
char
(
20
),
row_count
int
,
start_row
int
,
end_row
int
);
#----------------------------------------------------------------------
# tb3_eng1: key partitioning
#----------------------------------------------------------------------
#--replace_result $ENG1 ENG1
eval
create
table
tb3_eng1
(
i1
int
NOT
NULL
auto_increment
,
primary
key
(
i1
),
$column_list
)
engine
=
$ENG1
PARTITION
BY
KEY
(
i1
)
PARTITIONS
4
(
PARTITION
part1
,
PARTITION
part2
,
PARTITION
part3
,
PARTITION
part4
);
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval
load
data
local
infile
'$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
into
table
tb3_eng1
(
$col_access_list
);
if
(
$WITH_TRIGGERS
)
{
delimiter
//;
Create
trigger
tb3_eng1_ins
after
insert
on
tb3_eng1
for
each
row
BEGIN
insert
into
tb1_logs
(
dt1
,
entry_dsc
,
f4
)
values
(
now
(),
concat
(
'Insert row '
,
new
.
f1
,
' '
,
new
.
f2
,
' '
,
new
.
f3
,
' (tb3_eng1)'
),
new
.
f1
);
END
//
Create
trigger
tb3_eng1_upd
after
update
on
tb3_eng1
for
each
row
BEGIN
insert
into
tb1_logs
(
dt1
,
entry_dsc
,
f4
)
values
(
now
(),
concat
(
'Update row '
,
old
.
f1
,
' '
,
old
.
f2
,
'->'
,
new
.
f2
,
' '
,
old
.
f3
,
'->'
,
new
.
f3
,
' (tb3_eng1)'
),
new
.
f1
);
END
//
Create
trigger
tb3_eng1_del
after
delete
on
tb3_eng1
for
each
row
BEGIN
insert
into
tb1_logs
(
dt1
,
entry_dsc
,
f4
)
values
(
now
(),
concat
(
'Delete row '
,
old
.
f1
,
' '
,
old
.
f2
,
' '
,
old
.
f3
,
' (tb3_eng1)'
),
old
.
f1
);
END
//
delimiter
;
//
}
delimiter
//;
# This functions returns a random integer number
# between zero and 'num'
#-----------------------------------------------
create
function
int_rand
(
num
int
)
returns
int
BEGIN
return
round
(
num
*
rand
()
+
0.5
);
END
//
# This function returns a string in the length 'len' of
# random letters (ascii range of 65-122)
#------------------------------------------------------
create
function
str_rand
(
len
int
)
returns
char
(
12
)
BEGIN
declare
tmp_letter
char
(
1
);
declare
tmp_word
char
(
12
);
declare
word_str
char
(
12
)
default
''
;
wl_loop
:
WHILE
len
DO
set
tmp_letter
=
char
(
round
(
57
*
rand
()
+
65
));
set
tmp_word
=
concat
(
word_str
,
tmp_letter
);
set
word_str
=
tmp_word
;
set
len
=
len
-
1
;
END
WHILE
wl_loop
;
return
word_str
;
END
//
# This procedure scans 'tb1_master' table for rows where f1='num_pr'
# and for each row inserts a row in 'tb3_eng1'
#------------------------------------------------------------------
eval
create
procedure
ins_tb3_eng1
(
num_pr
int
,
str_pr
char
(
15
))
BEGIN
declare
done
int
default
0
;
declare
v3
decimal
(
5
,
3
);
declare
cur1
cursor
for
select
f3
from
tb1_master
where
f1
=
num_pr
;
declare
continue
handler
for
sqlstate
'01000'
set
done
=
1
;
declare
continue
handler
for
sqlstate
'02000'
set
done
=
1
;
open
cur1
;
fetch
cur1
into
v3
;
wl_loop
:
WHILE
NOT
done
DO
insert
into
tb3_eng1
(
$col_access_list
)
values
(
int_rand
(
@
f1_nums
),
concat
(
'I:'
,
str_pr
,
'-'
,
num_pr
),
v3
,
now
());
fetch
cur1
into
v3
;
END
WHILE
wl_loop
;
close
cur1
;
END
//
# This procedure does selects from the 'tb1_logs' and inserts the
# count into the table
#------------------------------------------------------------------
create
procedure
slct_tb1_logs
()
BEGIN
declare
done
int
default
0
;
declare
v4
int
;
declare
v_count
int
default
0
;
declare
str_val
char
(
15
)
default
ELT
(
int_rand
(
3
),
'Insert'
,
'Update'
,
'Delete'
);
declare
cur1
cursor
for
select
f4
from
tb1_logs
where
entry_dsc
like
concat
(
'%'
,
str_val
,
'%'
);
declare
continue
handler
for
sqlstate
'01000'
set
done
=
1
;
declare
continue
handler
for
sqlstate
'02000'
set
done
=
1
;
open
cur1
;
fetch
cur1
into
v4
;
wl_loop
:
WHILE
NOT
done
DO
set
v_count
=
v_count
+
1
;
fetch
cur1
into
v4
;
END
WHILE
wl_loop
;
close
cur1
;
insert
into
tb1_logs
(
dt1
,
entry_dsc
,
f4
)
values
(
now
(),
concat
(
'Number of \''
,
str_val
,
'\' rows is: '
,
v_count
,
' (tb1_log)'
),
0
);
END
//
delimiter
;
//
--
disable_abort_on_error
insert
into
systest1
.
tb3_eng1
values
(
NULL
,
50
,
'init_val'
,
12.345
,
'2005-01-01 00:00:00'
);
insert
into
systest1
.
tb3_eng1
values
(
NULL
,
70
,
'init_val'
,
12.345
,
'2005-01-01 00:00:00'
);
--
enable_abort_on_error
connection
default
;
0.
--
disable_abort_on_error
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
create
user
syst1user
@
'$CLIENT_HOST'
;
--
enable_abort_on_error
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
set
password
for
syst1user
@
'$CLIENT_HOST'
=
password
(
'systpass'
);
--
replace_result
$CLIENT_HOST
CLIENT_HOST
eval
grant
ALL
on
systest1
.*
to
syst1user
@
'$CLIENT_HOST'
;
use
systest1
;
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
$MASTER_MYSOCK
MASTER_MYSOCK
connect
(
syst1user
,
localhost
,
syst1user
,
systpass
,
systest1
,
$MASTER_MYPORT
,
$MASTER_MYSOCK
);
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
SET
@
f1_nums
=
$NUM_VAL
;
SET
@
tmp_num
=
int_rand
(
@
f1_nums
);
SET
@
tmp_word
=
str_rand
(
4
);
# DEBUG select @tmp_num, @tmp_word;
# Insert rows replacing the deleted rows using a strored procedure
# that reads the rows from a master table
CALL
ins_tb3_eng1
(
@
tmp_num
,
@
tmp_word
);
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
SET
@
f1_nums
=
$NUM_VAL
;
SET
@
tmp_num
=
int_rand
(
@
f1_nums
);
SET
@
tmp_word
=
str_rand
(
4
);
# DEBUG select @tmp_num, @tmp_word;
# Insert rows replacing the deleted rows using a strored procedure
# that reads the rows from a master table
CALL
ins_tb3_eng1
(
@
tmp_num
,
@
tmp_word
);
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
call
slct_tb1_logs
();
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
set
@
tmp_word
=
str_rand
(
4
);
select
@
tmp_num
,
@
tmp_word
;
# Update all rows in the table where f1 is one less the random number
update
tb3_eng1
set
f2
=
concat
(
'U:'
,
@
tmp_word
,
'-'
,
@
tmp_num
),
f3
=
f3
+
1
where
f1
=@
tmp_num
-
1
;
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
set
@
tmp_word
=
str_rand
(
4
);
select
@
tmp_num
,
@
tmp_word
;
# Update all rows in the table where f1 is one less the random number
update
tb3_eng1
set
f2
=
concat
(
'U:'
,
@
tmp_word
,
'-'
,
@
tmp_num
),
f3
=
f3
+
1
where
f1
=@
tmp_num
-
1
;
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
call
slct_tb1_logs
();
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
set
@
tmp_word
=
str_rand
(
4
);
select
@
tmp_num
,
@
tmp_word
;
# Update all rows in the table where f1 is one less the random number
update
tb3_eng1
set
f2
=
concat
(
'U:'
,
@
tmp_word
,
'-'
,
@
tmp_num
),
f3
=
f3
+
1
where
f1
=@
tmp_num
-
1
;
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
#--replace_result $NUM_VAL <NUM_VAL>
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
select
@
tmp_num
;
# DEBUG select @tmp_num, @tmp_word;
# Delete all rows from the table where f1 is equal to the above number
delete
from
tb3_eng1
where
f1
=@
tmp_num
;
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
select
*
from
tb3_eng1
where
f1
>
40
;
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
select
@
tmp_num
;
# DEBUG select @tmp_num, @tmp_word;
# Delete all rows from the table where f1 is equal to the above number
delete
from
tb3_eng1
where
f1
=@
tmp_num
;
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
select
*
from
tb3_eng1
where
f1
>
40
;
connection
syst1user
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
let
$NUM_VAL
=
`SELECT @NUM_VAL`
;
eval
set
@
f1_nums
=
$NUM_VAL
;
set
@
tmp_num
=
int_rand
(
@
f1_nums
);
select
@
tmp_num
;
select
@
tmp_num
,
@
tmp_word
;
# Delete all rows from the table where f1 is equal to the above number
delete
from
tb3_eng1
where
f1
=@
tmp_num
;
connection
systuser
;
--
source
suite
/
system_3
/
include
/
system_3_init
.
inc
use
systest1
;
select
*
from
tb3_eng1
where
f1
>
40
;
mysql-test/suite/parts/t/partition_value_innodb.test
View file @
9ce98dd1
...
...
@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author:
#
# Change Date:
#
# Change:
#
# Change Author:
mleich
#
# Change Date:
2008-12-08
#
# Change:
Remove test from disabled.def + change test that it gets skipped
#
################################################################################
#
...
...
@@ -22,6 +22,12 @@
# any of the variables.
#
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--
skip
# CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
...
...
mysql-test/suite/parts/t/partition_value_myisam.test
View file @
9ce98dd1
...
...
@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author:
#
# Change Date:
#
# Change:
#
# Change Author:
mleich
#
# Change Date:
2008-12-08
#
# Change:
Remove test from disabled.def + change test that it gets skipped
#
################################################################################
#
...
...
@@ -22,6 +22,12 @@
# any of the variables.
#
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--
skip
# CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
...
...
mysql-test/suite/parts/t/partition_value_ndb.test
View file @
9ce98dd1
...
...
@@ -8,9 +8,9 @@
#------------------------------------------------------------------------------#
# Original Author: mleich #
# Original Date: 2006-04-11 #
# Change Author:
#
# Change Date:
#
# Change:
#
# Change Author:
mleich
#
# Change Date:
2008-12-08
#
# Change:
Remove test from disabled.def + change test that it gets skipped
#
################################################################################
#
...
...
@@ -22,6 +22,12 @@
# any of the variables.
#
#
# CAST() within the partitioning function si no more supported, but we get
# this functionality probably soon again. Therefor we do not delete this test.
--
skip
# CAST() in partitioning function is currently not supported.
#------------------------------------------------------------------------------#
# General not engine specific settings and requirements
...
...
mysql-test/suite/rpl_ndb/t/disabled.def
View file @
9ce98dd1
...
...
@@ -10,7 +10,7 @@
#
##############################################################################
rpl_ndb_circular : Bug#
33849 COMMIT event missing in cluster circular replication.
rpl_ndb_circular_simplex : Bug#
33849 COMMIT event missing in cluster circular replication.
rpl_ndb_circular : Bug#
41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
rpl_ndb_circular_simplex : Bug#
41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
mysql-test/t/alter_table.test
View file @
9ce98dd1
...
...
@@ -751,6 +751,19 @@ ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4);
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
#
# Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types
#
create
table
t1
(
a
tinytext
character
set
latin1
);
alter
table
t1
convert
to
character
set
utf8
;
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
mediumtext
character
set
latin1
);
alter
table
t1
convert
to
character
set
utf8
;
show
create
table
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
#
...
...
mysql-test/t/disabled.def
View file @
9ce98dd1
...
...
@@ -10,7 +10,6 @@
#
##############################################################################
federated_transactions : Bug#29523 Transactions do not work
log_tables : Bug #37798: main.log_tables fails randomly on powermacg5 and windows
slow_query_log_func : Bug #37962: *_func tests containing sleeps/race conditions
wait_timeout_func : Bug #41225 joro wait_timeout_func fails
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enoiugh for pushbuild.
mysql-test/t/type_bit.test
View file @
9ce98dd1
...
...
@@ -367,6 +367,36 @@ CREATE TABLE IF NOT EXISTS t1 (
f1
bit
(
2
)
NOT
NULL
default
b
''
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
COLLATE
=
latin1_general_ci
;
#
# Bug#31399 Wrong query result when doing join buffering over BIT fields
#
create
table
t1bit7
(
a1
bit
(
7
)
not
null
)
engine
=
MyISAM
;
create
table
t2bit7
(
b1
bit
(
7
))
engine
=
MyISAM
;
insert
into
t1bit7
values
(
b
'1100000'
);
insert
into
t1bit7
values
(
b
'1100001'
);
insert
into
t1bit7
values
(
b
'1100010'
);
insert
into
t2bit7
values
(
b
'1100001'
);
insert
into
t2bit7
values
(
b
'1100010'
);
insert
into
t2bit7
values
(
b
'1100110'
);
select
bin
(
a1
)
from
t1bit7
,
t2bit7
where
t1bit7
.
a1
=
t2bit7
.
b1
;
drop
table
t1bit7
,
t2bit7
;
create
table
t1bit7
(
a1
bit
(
15
)
not
null
)
engine
=
MyISAM
;
create
table
t2bit7
(
b1
bit
(
15
))
engine
=
MyISAM
;
insert
into
t1bit7
values
(
b
'110000011111111'
);
insert
into
t1bit7
values
(
b
'110000111111111'
);
insert
into
t1bit7
values
(
b
'110001011111111'
);
insert
into
t2bit7
values
(
b
'110000111111111'
);
insert
into
t2bit7
values
(
b
'110001011111111'
);
insert
into
t2bit7
values
(
b
'110011011111111'
);
select
bin
(
a1
)
from
t1bit7
,
t2bit7
where
t1bit7
.
a1
=
t2bit7
.
b1
;
drop
table
t1bit7
,
t2bit7
;
--
echo
End
of
5.0
tests
#
...
...
sql/sql_select.cc
View file @
9ce98dd1
...
...
@@ -13856,6 +13856,7 @@ join_init_cache(THD *thd,JOIN_TAB *tables,uint table_count)
length
=
0
;
for
(
i
=
0
;
i
<
table_count
;
i
++
)
{
bool
have_bit_fields
=
FALSE
;
uint
null_fields
=
0
,
used_fields
;
Field
**
f_ptr
,
*
field
;
MY_BITMAP
*
read_set
=
tables
[
i
].
table
->
read_set
;
...
...
@@ -13870,13 +13871,16 @@ join_init_cache(THD *thd,JOIN_TAB *tables,uint table_count)
length
+=
field
->
fill_cache_field
(
copy
);
if
(
copy
->
blob_field
)
(
*
blob_ptr
++
)
=
copy
;
if
(
field
->
maybe_null
())
if
(
field
->
real_
maybe_null
())
null_fields
++
;
if
(
field
->
type
()
==
MYSQL_TYPE_BIT
&&
((
Field_bit
*
)
field
)
->
bit_len
)
have_bit_fields
=
TRUE
;
copy
++
;
}
}
/* Copy null bits from table */
if
(
null_fields
&&
tables
[
i
].
table
->
s
->
null
_fields
)
if
(
null_fields
||
have_bit
_fields
)
{
/* must copy null bits */
copy
->
str
=
tables
[
i
].
table
->
null_flags
;
copy
->
length
=
tables
[
i
].
table
->
s
->
null_bytes
;
...
...
sql/sql_table.cc
View file @
9ce98dd1
...
...
@@ -3114,7 +3114,9 @@ static bool prepare_blob_field(THD *thd, Create_field *sql_field)
if
((
sql_field
->
flags
&
BLOB_FLAG
)
&&
sql_field
->
length
)
{
if
(
sql_field
->
sql_type
==
MYSQL_TYPE_BLOB
)
if
(
sql_field
->
sql_type
==
FIELD_TYPE_BLOB
||
sql_field
->
sql_type
==
FIELD_TYPE_TINY_BLOB
||
sql_field
->
sql_type
==
FIELD_TYPE_MEDIUM_BLOB
)
{
/* The user has given a length to the blob column */
sql_field
->
sql_type
=
get_blob_type_from_length
(
sql_field
->
length
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment