mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into zippy.(none):/home/cmiller/work/mysql/m41-maint--07AB5
This commit is contained in:
4
mysql-test/include/have_case_sensitive_file_system.inc
Normal file
4
mysql-test/include/have_case_sensitive_file_system.inc
Normal file
@ -0,0 +1,4 @@
|
||||
--require r/case_sensitive_file_system.require
|
||||
--disable_query_log
|
||||
show variables like "lower_case_file_system";
|
||||
--enable_query_log
|
2
mysql-test/r/case_sensitive_file_system.require
Normal file
2
mysql-test/r/case_sensitive_file_system.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
lower_case_file_system OFF
|
@ -456,6 +456,22 @@ f1 f2
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect date value: '2003-04-05 g'
|
||||
Warning 1292 Truncated incorrect datetime value: '2003-04-05 10:11:12.101010234567'
|
||||
set names latin1;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
date_format('2004-01-01','%W (%a), %e %M (%b) %Y')
|
||||
Thursday (Thu), 1 January (Jan) 2004
|
||||
set lc_time_names=ru_RU;
|
||||
set names koi8r;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
date_format('2004-01-01','%W (%a), %e %M (%b) %Y')
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>), 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>) 2004
|
||||
set lc_time_names=de_DE;
|
||||
set names latin1;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
date_format('2004-01-01','%W (%a), %e %M (%b) %Y')
|
||||
Donnerstag (Do), 1 Januar (Jan) 2004
|
||||
set names latin1;
|
||||
set lc_time_names=en_US;
|
||||
create table t1 (f1 datetime);
|
||||
insert into t1 (f1) values ("2005-01-01");
|
||||
insert into t1 (f1) values ("2005-02-01");
|
||||
|
@ -817,3 +817,43 @@ check table t1 extended;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 geometry NOT NULL default '',
|
||||
SPATIAL KEY i1 (c1(32))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 geometry NOT NULL default '',
|
||||
SPATIAL KEY i1 (c1(32))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-65.7402776999 -96.6686111000,
|
||||
-65.7372222000 -96.5516666000,
|
||||
-65.8502777000 -96.5461111000,
|
||||
-65.8527777000 -96.6627777000,
|
||||
-65.7402776999 -96.6686111000))'));
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
|
11
mysql-test/r/lowercase_fs_off.result
Normal file
11
mysql-test/r/lowercase_fs_off.result
Normal file
@ -0,0 +1,11 @@
|
||||
create database d1;
|
||||
grant all on d1.* to 'sample'@'localhost' identified by 'password';
|
||||
flush privileges;
|
||||
select database();
|
||||
database()
|
||||
d1
|
||||
create database d2;
|
||||
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2'
|
||||
create database D1;
|
||||
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1'
|
||||
drop database if exists d1;
|
@ -769,3 +769,24 @@ a b
|
||||
xxxxxxxxx bbbbbb
|
||||
xxxxxxxxx bbbbbb
|
||||
DROP TABLE t1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TEMPORARY TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TEMPORARY TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
create table t1 (a int) engine=myisam select 42 a;
|
||||
select * from t1;
|
||||
a
|
||||
9
|
||||
select * from t1;
|
||||
a
|
||||
99
|
||||
select * from t1;
|
||||
a
|
||||
42
|
||||
drop table t1;
|
||||
|
@ -875,3 +875,17 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count;
|
||||
@@max_prepared_stmt_count @@prepared_stmt_count
|
||||
3 0
|
||||
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
|
||||
drop table if exists t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1";
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
deallocate prepare stmt;
|
||||
|
@ -627,3 +627,25 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1');
|
||||
count(*)
|
||||
4
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2 (
|
||||
pk1 int(11) NOT NULL,
|
||||
pk2 int(11) NOT NULL,
|
||||
pk3 int(11) NOT NULL,
|
||||
pk4 int(11) NOT NULL,
|
||||
filler char(82),
|
||||
PRIMARY KEY (pk1,pk2,pk3,pk4)
|
||||
) DEFAULT CHARSET=latin1;
|
||||
insert into t2 select 1, A.a+10*B.a, 432, 44, 'fillerZ' from t1 A, t1 B;
|
||||
INSERT INTO t2 VALUES (2621, 2635, 0, 0,'filler'), (2621, 2635, 1, 0,'filler'),
|
||||
(2621, 2635, 10, 0,'filler'), (2621, 2635, 11, 0,'filler'),
|
||||
(2621, 2635, 14, 0,'filler'), (2621, 2635, 1000015, 0,'filler');
|
||||
SELECT * FROM t2
|
||||
WHERE ((((pk4 =0) AND (pk1 =2621) AND (pk2 =2635)))
|
||||
OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635))))
|
||||
) AND (pk3 >=1000000);
|
||||
pk1 pk2 pk3 pk4 filler
|
||||
2621 2635 1000015 0 filler
|
||||
drop table t1, t2;
|
||||
|
@ -260,6 +260,20 @@ select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1,
|
||||
str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2;
|
||||
--enable_ps_protocol
|
||||
|
||||
#
|
||||
# Test of locale dependent date format (WL#2928 Date Translation NRE)
|
||||
#
|
||||
set names latin1;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
set lc_time_names=ru_RU;
|
||||
set names koi8r;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
set lc_time_names=de_DE;
|
||||
set names latin1;
|
||||
select date_format('2004-01-01','%W (%a), %e %M (%b) %Y');
|
||||
set names latin1;
|
||||
set lc_time_names=en_US;
|
||||
|
||||
#
|
||||
# Bug #14016
|
||||
#
|
||||
|
@ -188,4 +188,48 @@ check table t1 extended;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#17877 - Corrupted spatial index
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 geometry NOT NULL default '',
|
||||
SPATIAL KEY i1 (c1(32))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
# This showed a missing key.
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 geometry NOT NULL default '',
|
||||
SPATIAL KEY i1 (c1(32))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-65.7402776999 -96.6686111000,
|
||||
-65.7372222000 -96.5516666000,
|
||||
-65.8502777000 -96.5461111000,
|
||||
-65.8527777000 -96.6627777000,
|
||||
-65.7402776999 -96.6686111000))'));
|
||||
# This is the same as the first insert to get a non-unique key.
|
||||
INSERT INTO t1 (c1) VALUES (
|
||||
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
|
||||
-18.6055555000 -66.8158332999,
|
||||
-18.7186111000 -66.8102777000,
|
||||
-18.7211111000 -66.9269443999,
|
||||
-18.6086111000 -66.9327777000))'));
|
||||
# This showed (and still shows) OK.
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
27
mysql-test/t/lowercase_fs_off.test
Normal file
27
mysql-test/t/lowercase_fs_off.test
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Specific tests for case sensitive file systems
|
||||
# i.e. lower_case_filesystem=OFF
|
||||
#
|
||||
-- source include/have_case_sensitive_file_system.inc
|
||||
|
||||
connect (master,localhost,root,,);
|
||||
connection master;
|
||||
create database d1;
|
||||
grant all on d1.* to 'sample'@'localhost' identified by 'password';
|
||||
flush privileges;
|
||||
|
||||
connect (sample,localhost,sample,password,d1);
|
||||
connection sample;
|
||||
select database();
|
||||
--error 1044
|
||||
create database d2;
|
||||
--error 1044
|
||||
create database D1;
|
||||
disconnect sample;
|
||||
|
||||
connection master;
|
||||
drop database if exists d1;
|
||||
disconnect master;
|
||||
connection default;
|
||||
|
||||
# End of 4.1 tests
|
@ -726,4 +726,35 @@ UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb';
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#8706 - temporary table with data directory option fails
|
||||
#
|
||||
connect (session1,localhost,root,,);
|
||||
connect (session2,localhost,root,,);
|
||||
|
||||
connection session1;
|
||||
disable_query_log;
|
||||
eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a;
|
||||
enable_query_log;
|
||||
show create table t1;
|
||||
|
||||
connection session2;
|
||||
disable_query_log;
|
||||
eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a;
|
||||
enable_query_log;
|
||||
show create table t1;
|
||||
|
||||
connection default;
|
||||
create table t1 (a int) engine=myisam select 42 a;
|
||||
|
||||
connection session1;
|
||||
select * from t1;
|
||||
disconnect session1;
|
||||
connection session2;
|
||||
select * from t1;
|
||||
disconnect session2;
|
||||
connection default;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -926,4 +926,29 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count;
|
||||
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
|
||||
--enable_ps_protocol
|
||||
|
||||
#
|
||||
# Bug#19399 "Stored Procedures 'Lost Connection' when dropping/creating
|
||||
# tables"
|
||||
# Check that multi-delete tables are also cleaned up before re-execution.
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
--enable_warnings
|
||||
# exact delete syntax is essential
|
||||
prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1";
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
# the server crashed on the next statement without the fix
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
# the problem was in memory corruption: repeat the test just in case
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
create temporary table if not exists t1 (a1 int);
|
||||
execute stmt;
|
||||
drop temporary table t1;
|
||||
deallocate prepare stmt;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -484,4 +484,30 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 1' OR ARG1 != ' 2');
|
||||
SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1');
|
||||
drop table t1;
|
||||
|
||||
# BUG#16168: Wrong range optimizer results, "Use_count: Wrong count ..."
|
||||
# warnings in server stderr.
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2 (
|
||||
pk1 int(11) NOT NULL,
|
||||
pk2 int(11) NOT NULL,
|
||||
pk3 int(11) NOT NULL,
|
||||
pk4 int(11) NOT NULL,
|
||||
filler char(82),
|
||||
PRIMARY KEY (pk1,pk2,pk3,pk4)
|
||||
) DEFAULT CHARSET=latin1;
|
||||
|
||||
insert into t2 select 1, A.a+10*B.a, 432, 44, 'fillerZ' from t1 A, t1 B;
|
||||
INSERT INTO t2 VALUES (2621, 2635, 0, 0,'filler'), (2621, 2635, 1, 0,'filler'),
|
||||
(2621, 2635, 10, 0,'filler'), (2621, 2635, 11, 0,'filler'),
|
||||
(2621, 2635, 14, 0,'filler'), (2621, 2635, 1000015, 0,'filler');
|
||||
|
||||
SELECT * FROM t2
|
||||
WHERE ((((pk4 =0) AND (pk1 =2621) AND (pk2 =2635)))
|
||||
OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635))))
|
||||
) AND (pk3 >=1000000);
|
||||
drop table t1, t2;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user