mirror of
https://github.com/MariaDB/server.git
synced 2025-11-10 23:02:54 +03:00
Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new client/mysql.cc: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/r/rpl_temporary.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/rpl_temporary.test: Auto merged sql/item_strfunc.cc: Auto merged
This commit is contained in:
@@ -448,6 +448,14 @@ int main(int argc,char *argv[])
|
|||||||
MYF(MY_WME));
|
MYF(MY_WME));
|
||||||
if (histfile)
|
if (histfile)
|
||||||
sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
|
sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
|
||||||
|
char link_name[FN_REFLEN];
|
||||||
|
if (my_readlink(link_name, histfile, 0) == 0 &&
|
||||||
|
strncmp(link_name, "/dev/null", 10) == 0)
|
||||||
|
{
|
||||||
|
/* The .mysql_history file is a symlink to /dev/null, don't use it */
|
||||||
|
my_free(histfile, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
histfile= 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (histfile)
|
if (histfile)
|
||||||
{
|
{
|
||||||
@@ -484,7 +492,7 @@ sig_handler mysql_end(int sig)
|
|||||||
{
|
{
|
||||||
mysql_close(&mysql);
|
mysql_close(&mysql);
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
if (!status.batch && !quick && !opt_html && !opt_xml)
|
if (!status.batch && !quick && !opt_html && !opt_xml && histfile)
|
||||||
{
|
{
|
||||||
/* write-history */
|
/* write-history */
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
#ifdef MYSQL_CLIENT
|
#ifdef MYSQL_CLIENT
|
||||||
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
||||||
"Verify servers \"Common Name\" in it's cert against hostname used when connecting. This option is disabled by default.",
|
"Verify server's \"Common Name\" in its cert against hostname used when connecting. This option is disabled by default.",
|
||||||
(gptr*) &opt_ssl_verify_server_cert, (gptr*) &opt_ssl_verify_server_cert,
|
(gptr*) &opt_ssl_verify_server_cert, (gptr*) &opt_ssl_verify_server_cert,
|
||||||
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1017,6 +1017,13 @@ t
|
|||||||
1000000
|
1000000
|
||||||
1
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
select load_file("lkjlkj");
|
||||||
|
load_file("lkjlkj")
|
||||||
|
NULL
|
||||||
|
select ifnull(load_file("lkjlkj"),"it's null");
|
||||||
|
ifnull(load_file("lkjlkj"),"it's null")
|
||||||
|
it's null
|
||||||
|
End of 4.1 tests
|
||||||
create table t1 (d decimal default null);
|
create table t1 (d decimal default null);
|
||||||
insert into t1 values (null);
|
insert into t1 values (null);
|
||||||
select format(d, 2) from t1;
|
select format(d, 2) from t1;
|
||||||
|
|||||||
Binary file not shown.
@@ -94,8 +94,6 @@ create temporary table t102 (id int);
|
|||||||
set @session.pseudo_thread_id=200;
|
set @session.pseudo_thread_id=200;
|
||||||
create temporary table t201 (id int);
|
create temporary table t201 (id int);
|
||||||
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
|
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
|
||||||
set @con1_id=connection_id();
|
|
||||||
kill @con1_id;
|
|
||||||
create table t1(f int);
|
create table t1(f int);
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
select * from t1 /* must be 1 */;
|
select * from t1 /* must be 1 */;
|
||||||
|
|||||||
@@ -3427,3 +3427,22 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 3 Using where
|
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 3 Using where
|
||||||
1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10
|
1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
|
||||||
|
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
|
||||||
|
(3,1), (5,1), (8,9), (2,2), (0,9);
|
||||||
|
CREATE TABLE t2 (c int, d int, f int, INDEX(c,f));
|
||||||
|
INSERT INTO t2 VALUES
|
||||||
|
(1,0,0), (1,0,1), (2,0,0), (2,0,1), (3,0,0), (4,0,1),
|
||||||
|
(5,0,0), (5,0,1), (6,0,0), (0,0,1), (7,0,0), (7,0,1),
|
||||||
|
(0,0,0), (0,0,1), (8,0,0), (8,0,1), (9,0,0), (9,0,1);
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
|
||||||
|
1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using where
|
||||||
|
1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|||||||
@@ -666,7 +666,14 @@ select rpad(i, 7, ' ') as t from t1;
|
|||||||
--disable_metadata
|
--disable_metadata
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
#
|
||||||
|
# Bug #10418: LOAD_FILE does not behave like in manual if file does not exist
|
||||||
|
#
|
||||||
|
|
||||||
|
select load_file("lkjlkj");
|
||||||
|
select ifnull(load_file("lkjlkj"),"it's null");
|
||||||
|
|
||||||
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #13361: SELECT FORMAT(<decimal field with null>, 2) crashes
|
# Bug #13361: SELECT FORMAT(<decimal field with null>, 2) crashes
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ eval select * into dumpfile "../tmp/outfile-test.2" from t1;
|
|||||||
--error 1086
|
--error 1086
|
||||||
eval select * into dumpfile "../tmp/outfile-test.3" from t1;
|
eval select * into dumpfile "../tmp/outfile-test.3" from t1;
|
||||||
enable_query_log;
|
enable_query_log;
|
||||||
--error 13,2
|
|
||||||
select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
|
select load_file(concat(@tmpdir,"/outfile-test.not-exist"));
|
||||||
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.1
|
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.1
|
||||||
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.2
|
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.2
|
||||||
|
|||||||
@@ -171,8 +171,18 @@ create temporary table t102 (id int);
|
|||||||
set @session.pseudo_thread_id=200;
|
set @session.pseudo_thread_id=200;
|
||||||
create temporary table t201 (id int);
|
create temporary table t201 (id int);
|
||||||
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
|
create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
|
||||||
set @con1_id=connection_id();
|
|
||||||
kill @con1_id;
|
#
|
||||||
|
# Don't kill our own connection to the server as
|
||||||
|
# the result code differs depending on platform.
|
||||||
|
#
|
||||||
|
# Select the id to kill into a variable of mysqltest
|
||||||
|
let $con1_id= `select connection_id()`;
|
||||||
|
# Switch connection to avoid killing our own connection
|
||||||
|
connection master;
|
||||||
|
--disable_query_log
|
||||||
|
eval kill $con1_id;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
#now do something to show that slave is ok after DROP temp tables
|
#now do something to show that slave is ok after DROP temp tables
|
||||||
connection master;
|
connection master;
|
||||||
|
|||||||
@@ -2899,3 +2899,24 @@ select 'In next EXPLAIN, B.rows must be exactly 10:' Z;
|
|||||||
explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
|
explain select * from t2 A, t2 B where A.a=5 and A.b=5 and A.C<5
|
||||||
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
|
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
#Bug #18940: selection of optimal execution plan caused by equality
|
||||||
|
# propagation (the bug was fixed by the patch for bug #17379)
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
|
||||||
|
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
|
||||||
|
(3,1), (5,1), (8,9), (2,2), (0,9);
|
||||||
|
|
||||||
|
CREATE TABLE t2 (c int, d int, f int, INDEX(c,f));
|
||||||
|
INSERT INTO t2 VALUES
|
||||||
|
(1,0,0), (1,0,1), (2,0,0), (2,0,1), (3,0,0), (4,0,1),
|
||||||
|
(5,0,0), (5,0,1), (6,0,0), (0,0,1), (7,0,0), (7,0,1),
|
||||||
|
(0,0,0), (0,0,1), (8,0,0), (8,0,1), (9,0,0), (9,0,1);
|
||||||
|
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
|
||||||
|
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|||||||
@@ -2579,7 +2579,7 @@ String *Item_load_file::val_str(String *str)
|
|||||||
(void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
|
(void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
|
||||||
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
|
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
|
||||||
|
|
||||||
if (!my_stat(path, &stat_info, MYF(MY_WME)))
|
if (!my_stat(path, &stat_info, MYF(0)))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (!(stat_info.st_mode & S_IROTH))
|
if (!(stat_info.st_mode & S_IROTH))
|
||||||
|
|||||||
Reference in New Issue
Block a user