summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/config-netware.h7
-rw-r--r--include/myisam.h2
-rw-r--r--myisam/mi_check.c6
-rw-r--r--myisam/sort.c2
-rw-r--r--mysql-test/r/bdb-crash.result2
-rw-r--r--mysql-test/r/group_by.result29
-rw-r--r--mysql-test/r/join_outer.result14
-rw-r--r--mysql-test/r/order_by.result2
-rw-r--r--mysql-test/r/query_cache.result12
-rw-r--r--mysql-test/r/type_blob.result8
-rw-r--r--mysql-test/r/type_decimal.result2
-rw-r--r--mysql-test/r/type_ranges.result4
-rw-r--r--mysql-test/r/update.result2
-rw-r--r--mysql-test/t/bdb-crash.test2
-rw-r--r--mysql-test/t/group_by.test22
-rw-r--r--mysql-test/t/join_outer.test14
-rw-r--r--mysql-test/t/order_by.test2
-rw-r--r--mysql-test/t/query_cache.test13
-rw-r--r--mysql-test/t/type_blob.test8
-rw-r--r--mysql-test/t/type_decimal.test2
-rw-r--r--mysql-test/t/type_ranges.test4
-rw-r--r--mysql-test/t/update.test2
-rw-r--r--netware/BUILD/create-patch56
-rwxr-xr-xnetware/BUILD/mwenv10
-rwxr-xr-xnetware/BUILD/nwbootstrap2
-rw-r--r--netware/Makefile.am7
-rw-r--r--netware/comp_err.def10
-rw-r--r--netware/isamchk.def1
-rw-r--r--netware/isamlog.def3
-rw-r--r--netware/libmysql.def1
-rw-r--r--netware/my_manage.c219
-rw-r--r--netware/my_manage.h24
-rw-r--r--netware/my_print_defaults.def1
-rw-r--r--netware/myisamchk.def1
-rw-r--r--netware/myisamlog.def1
-rw-r--r--netware/myisampack.def1
-rw-r--r--netware/mysql.def1
-rw-r--r--netware/mysql_install.def1
-rw-r--r--netware/mysql_install_db.c57
-rw-r--r--netware/mysql_install_db.def1
-rw-r--r--netware/mysql_test_run.c212
-rw-r--r--netware/mysql_test_run.def1
-rw-r--r--netware/mysqladmin.def1
-rw-r--r--netware/mysqlbinlog.def1
-rw-r--r--netware/mysqlcheck.def1
-rw-r--r--netware/mysqld.def2
-rw-r--r--netware/mysqld_safe.c98
-rw-r--r--netware/mysqld_safe.def2
-rw-r--r--netware/mysqldump.def1
-rw-r--r--netware/mysqlimport.def1
-rw-r--r--netware/mysqlshow.def1
-rw-r--r--netware/mysqltest.def1
-rw-r--r--netware/pack_isam.def3
-rw-r--r--netware/perror.def1
-rw-r--r--netware/replace.def1
-rw-r--r--netware/resolveip.def1
-rw-r--r--sql-bench/crash-me.sh14
-rw-r--r--sql-bench/limits/mysql.cfg46
-rw-r--r--sql/item.cc1
-rw-r--r--sql/item_strfunc.cc14
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/share/swedish/errmsg.txt166
-rw-r--r--sql/sql_parse.cc20
-rw-r--r--sql/sql_yacc.yy2
-rw-r--r--support-files/MacOSX/ReadMe.txt2
65 files changed, 679 insertions, 482 deletions
diff --git a/include/config-netware.h b/include/config-netware.h
index 57bf500da47..dab365a7127 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -22,17 +22,13 @@
#include <errno.h>
#include <screen.h>
#include <limits.h>
-#include <nks/synch.h>
-#include <nks/thread.h>
#include <signal.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
-#include <nks/errno.h>
#include <sys/types.h>
#include <time.h>
#include <sys/time.h>
-#include <nks/time.h>
#include <pthread.h>
#include <termios.h>
@@ -48,6 +44,9 @@
#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
#define HAVE_BROKEN_REALPATH 1
+/* include the old function apis */
+#define USE_OLD_FUNCTIONS 1
+
/* no case sensitivity */
#define FN_NO_CASE_SENCE 1
diff --git a/include/myisam.h b/include/myisam.h
index eb260537628..33aa6aa3f31 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -364,8 +364,10 @@ typedef struct st_sort_info
SORT_FT_BUF *ft_buf;
/* sync things */
uint got_error, threads_running;
+#ifdef THREAD
pthread_mutex_t mutex;
pthread_cond_t cond;
+#endif
} SORT_INFO;
/* functions in mi_check */
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index a55096dd061..73bdcea9cc3 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -2096,7 +2096,7 @@ err:
Threaded repair of table using sorting
SYNOPSIS
- mi_repair_by_sort_parallel()
+ mi_repair_parallel()
param Repair parameters
info MyISAM handler to repair
name Name of table (for warnings)
@@ -2115,6 +2115,9 @@ err:
int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick)
{
+#ifndef THREAD
+ return mi_repair_by_sort(param, info, name, rep_quick);
+#else
int got_error;
uint i,key, total_key_length, istep;
ulong rec_length;
@@ -2485,6 +2488,7 @@ err:
share->pack.header_length=0;
}
DBUG_RETURN(got_error);
+#endif /* THREAD */
}
/* Read next record and return next key */
diff --git a/myisam/sort.c b/myisam/sort.c
index 006b96cfaab..09e487e1165 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -297,6 +297,7 @@ static ha_rows NEAR_F find_all_keys(MI_SORT_PARAM *info, uint keys,
} /* find_all_keys */
+#ifdef THREAD
/* Search after all keys and place them in a temp. file */
pthread_handler_decl(thr_find_all_keys,arg)
@@ -590,6 +591,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
my_free((gptr) mergebuf,MYF(MY_ALLOW_ZERO_PTR));
return got_error;
}
+#endif /* THREAD */
/* Write all keys in memory to file for later merge */
diff --git a/mysql-test/r/bdb-crash.result b/mysql-test/r/bdb-crash.result
index 42c826d55da..5079368ea21 100644
--- a/mysql-test/r/bdb-crash.result
+++ b/mysql-test/r/bdb-crash.result
@@ -1,6 +1,6 @@
drop table if exists t1;
CREATE TABLE t1 (
-ChargeID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+ChargeID int(10) unsigned NOT NULL auto_increment,
ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
ChargeDate date DEFAULT '0000-00-00' NOT NULL,
ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index d13f31d6bef..337d5639056 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -13,7 +13,7 @@ INSERT INTO t1 VALUES (2,2,2,'','0000-00-00');
INSERT INTO t1 VALUES (2,1,1,'','0000-00-00');
INSERT INTO t1 VALUES (3,3,3,'','0000-00-00');
CREATE TABLE t2 (
-userID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+userID int(10) unsigned NOT NULL auto_increment,
niName char(15),
passwd char(8),
mail char(50),
@@ -53,7 +53,7 @@ userid MIN(t1.score+0.0)
2 2.0
drop table t1,t2;
CREATE TABLE t1 (
-PID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+PID int(10) unsigned NOT NULL auto_increment,
payDate date DEFAULT '0000-00-00' NOT NULL,
recDate datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
URID int(10) unsigned DEFAULT '0' NOT NULL,
@@ -76,7 +76,7 @@ SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000
Can't group on 'IsNew'
drop table t1;
CREATE TABLE t1 (
-cid mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+cid mediumint(9) NOT NULL auto_increment,
firstname varchar(32) DEFAULT '' NOT NULL,
surname varchar(32) DEFAULT '' NOT NULL,
PRIMARY KEY (cid)
@@ -84,7 +84,7 @@ PRIMARY KEY (cid)
INSERT INTO t1 VALUES (1,'That','Guy');
INSERT INTO t1 VALUES (2,'Another','Gent');
CREATE TABLE t2 (
-call_id mediumint(8) DEFAULT '0' NOT NULL auto_increment,
+call_id mediumint(8) NOT NULL auto_increment,
contact_id mediumint(8) DEFAULT '0' NOT NULL,
PRIMARY KEY (call_id),
KEY contact_id (contact_id)
@@ -104,7 +104,7 @@ cid CONCAT(firstname, ' ', surname) COUNT(call_id)
drop table t1,t2;
unlock tables;
CREATE TABLE t1 (
-bug_id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+bug_id mediumint(9) NOT NULL auto_increment,
groupset bigint(20) DEFAULT '0' NOT NULL,
assigned_to mediumint(9) DEFAULT '0' NOT NULL,
bug_file_loc text,
@@ -570,3 +570,22 @@ a MAX(b) MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h')
1 4 c
10 43 a,b,d,f
drop table t1;
+create table t1 (id int not null, qty int not null);
+insert into t1 values (1,2),(1,3),(2,4),(2,5);
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and cqty>1;
+id sqty cqty
+1 5 2
+2 9 2
+select id, sum(qty) as sqty from t1 group by id having sqty>2 and count(qty)>1;
+id sqty
+1 5
+2 9
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sqty>2 and cqty>1;
+id sqty cqty
+1 5 2
+2 9 2
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and count(qty)>1;
+id sqty cqty
+1 5 2
+2 9 2
+drop table t1;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 8abe6d517ee..9ac44bec377 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -234,7 +234,7 @@ INSERT INTO t2 VALUES (11410,11410,131,0);
INSERT INTO t2 VALUES (11416,11416,32767,0);
INSERT INTO t2 VALUES (11409,0,0,0);
CREATE TABLE t3 (
-id int(11) DEFAULT '0' NOT NULL auto_increment,
+id int(11) NOT NULL auto_increment,
dni_pasaporte char(16) DEFAULT '' NOT NULL,
idPla int(11) DEFAULT '0' NOT NULL,
cod_asig int(11) DEFAULT '0' NOT NULL,
@@ -247,7 +247,7 @@ UNIQUE dni_pasaporte_2 (dni_pasaporte,idPla,cod_asig,any,quatrimestre)
);
INSERT INTO t3 VALUES (1,'11111111',1,10362,98,1,'M');
CREATE TABLE t4 (
-id int(11) DEFAULT '0' NOT NULL auto_increment,
+id int(11) NOT NULL auto_increment,
papa int(11) DEFAULT '0' NOT NULL,
fill int(11) DEFAULT '0' NOT NULL,
idPla int(11) DEFAULT '0' NOT NULL,
@@ -284,7 +284,7 @@ fill idPla
10362 NULL
drop table t1,t2,t3,test.t4;
CREATE TABLE t1 (
-id smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
+id smallint(5) unsigned NOT NULL auto_increment,
name char(60) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
);
@@ -292,7 +292,7 @@ INSERT INTO t1 VALUES (1,'Antonio Paz');
INSERT INTO t1 VALUES (2,'Lilliana Angelovska');
INSERT INTO t1 VALUES (3,'Thimble Smith');
CREATE TABLE t2 (
-id smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
+id smallint(5) unsigned NOT NULL auto_increment,
owner smallint(5) unsigned DEFAULT '0' NOT NULL,
name char(60),
PRIMARY KEY (id)
@@ -382,15 +382,15 @@ id str
2 NULL
drop table t1;
CREATE TABLE t1 (
-t1_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t1_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t1_id)
);
CREATE TABLE t2 (
-t2_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t2_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t2_id)
);
CREATE TABLE t3 (
-t3_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t3_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t3_id)
);
CREATE TABLE t4 (
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index d0d7a954c99..bd5b283f26a 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -15,7 +15,7 @@ INSERT INTO t1 VALUES (2,6,'60671515','Y');
INSERT INTO t1 VALUES (2,7,'60671569','Y');
INSERT INTO t1 VALUES (2,3,'dd','Y');
CREATE TABLE t2 (
-id int(6) DEFAULT '0' NOT NULL auto_increment,
+id int(6) NOT NULL auto_increment,
description varchar(40) NOT NULL,
idform varchar(40),
ordre int(6) unsigned DEFAULT '0' NOT NULL,
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 00d79ec0b6e..da229571497 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -566,3 +566,15 @@ show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
drop table t1;
+drop table if exists t1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+select * from t1 into outfile "query_caceh.out.file";
+select * from t1 limit 1 into dumpfile "query_cache.dump.file";
+show status like "Qcache_queries_in_cache";
+Variable_name Value
+Qcache_queries_in_cache 0
+drop table t1;
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 2126fadba58..24c0fcbac40 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -351,7 +351,7 @@ Incorrect sub part key. The used key part isn't a string, the used length is lon
create table t1 (a text, key (a(255)));
drop table t1;
CREATE TABLE t1 (
-t1_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t1_id bigint(21) NOT NULL auto_increment,
_field_72 varchar(128) DEFAULT '' NOT NULL,
_field_95 varchar(32),
_field_115 tinyint(4) DEFAULT '0' NOT NULL,
@@ -375,7 +375,7 @@ INSERT INTO t2 VALUES (1,1);
INSERT INTO t2 VALUES (2,1);
INSERT INTO t2 VALUES (2,2);
CREATE TABLE t3 (
-t3_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t3_id bigint(21) NOT NULL auto_increment,
_field_131 varchar(128),
_field_133 tinyint(4) DEFAULT '0' NOT NULL,
_field_135 datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
@@ -403,7 +403,7 @@ PRIMARY KEY (seq_0_id,seq_1_id)
INSERT INTO t4 VALUES (1,1);
INSERT INTO t4 VALUES (2,1);
CREATE TABLE t5 (
-t5_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t5_id bigint(21) NOT NULL auto_increment,
_field_149 tinyint(4),
_field_156 varchar(128) DEFAULT '' NOT NULL,
_field_157 varchar(128) DEFAULT '' NOT NULL,
@@ -430,7 +430,7 @@ INSERT INTO t6 VALUES (1,1);
INSERT INTO t6 VALUES (1,2);
INSERT INTO t6 VALUES (2,2);
CREATE TABLE t7 (
-t7_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+t7_id bigint(21) NOT NULL auto_increment,
_field_143 tinyint(4),
_field_165 varchar(32),
_field_166 smallint(6) DEFAULT '0' NOT NULL,
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index 0e60eefc9c7..4c326957c03 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -1,6 +1,6 @@
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
-id int(11) DEFAULT '0' NOT NULL auto_increment,
+id int(11) NOT NULL auto_increment,
datatype_id int(11) DEFAULT '0' NOT NULL,
minvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL,
maxvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL,
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index 1b2c775509e..afc4f7c7a8b 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -1,6 +1,6 @@
drop table if exists t1,t2,t3;
CREATE TABLE t1 (
-auto int(5) unsigned DEFAULT 0 NOT NULL auto_increment,
+auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
@@ -129,7 +129,7 @@ auto new_field new_blob_col date_field
15 new 4294967295 0000-00-00
16 new NULL NULL
CREATE TABLE t2 (
-auto int(5) unsigned NOT NULL DEFAULT 0 auto_increment,
+auto int(5) unsigned NOT NULL auto_increment,
string char(20),
mediumblob_col mediumblob not null,
new_field char(2),
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index 159b971440b..9978e3cb29c 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -96,7 +96,7 @@ KEY k4 (assignment),
KEY ticket (ticket)
) TYPE=MyISAM;
INSERT INTO t1 VALUES (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','');
-alter table t1 change lfdnr lfdnr int(10) unsigned default 0 not null auto_increment;
+alter table t1 change lfdnr lfdnr int(10) unsigned not null auto_increment;
update t1 set status=1 where type='Open';
select status from t1;
status
diff --git a/mysql-test/t/bdb-crash.test b/mysql-test/t/bdb-crash.test
index 956645b1188..d77de901a30 100644
--- a/mysql-test/t/bdb-crash.test
+++ b/mysql-test/t/bdb-crash.test
@@ -6,7 +6,7 @@
drop table if exists t1;
--enable_warnings
CREATE TABLE t1 (
- ChargeID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+ ChargeID int(10) unsigned NOT NULL auto_increment,
ServiceID int(10) unsigned DEFAULT '0' NOT NULL,
ChargeDate date DEFAULT '0000-00-00' NOT NULL,
ChargeAmount decimal(20,2) DEFAULT '0.00' NOT NULL,
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 85ec680b3a2..912bed1955c 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -27,7 +27,7 @@ INSERT INTO t1 VALUES (2,1,1,'','0000-00-00');
INSERT INTO t1 VALUES (3,3,3,'','0000-00-00');
CREATE TABLE t2 (
- userID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+ userID int(10) unsigned NOT NULL auto_increment,
niName char(15),
passwd char(8),
mail char(50),
@@ -57,7 +57,7 @@ drop table t1,t2;
#
CREATE TABLE t1 (
- PID int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
+ PID int(10) unsigned NOT NULL auto_increment,
payDate date DEFAULT '0000-00-00' NOT NULL,
recDate datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
URID int(10) unsigned DEFAULT '0' NOT NULL,
@@ -89,7 +89,7 @@ drop table t1;
#
CREATE TABLE t1 (
- cid mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+ cid mediumint(9) NOT NULL auto_increment,
firstname varchar(32) DEFAULT '' NOT NULL,
surname varchar(32) DEFAULT '' NOT NULL,
PRIMARY KEY (cid)
@@ -98,7 +98,7 @@ INSERT INTO t1 VALUES (1,'That','Guy');
INSERT INTO t1 VALUES (2,'Another','Gent');
CREATE TABLE t2 (
- call_id mediumint(8) DEFAULT '0' NOT NULL auto_increment,
+ call_id mediumint(8) NOT NULL auto_increment,
contact_id mediumint(8) DEFAULT '0' NOT NULL,
PRIMARY KEY (call_id),
KEY contact_id (contact_id)
@@ -124,7 +124,7 @@ unlock tables;
#
CREATE TABLE t1 (
- bug_id mediumint(9) DEFAULT '0' NOT NULL auto_increment,
+ bug_id mediumint(9) NOT NULL auto_increment,
groupset bigint(20) DEFAULT '0' NOT NULL,
assigned_to mediumint(9) DEFAULT '0' NOT NULL,
bug_file_loc text,
@@ -426,3 +426,15 @@ select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a;
select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a;
select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a;
drop table t1;
+
+#
+# Problem with group by and alias
+#
+
+create table t1 (id int not null, qty int not null);
+insert into t1 values (1,2),(1,3),(2,4),(2,5);
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and cqty>1;
+select id, sum(qty) as sqty from t1 group by id having sqty>2 and count(qty)>1;
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sqty>2 and cqty>1;
+select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and count(qty)>1;
+drop table t1;
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index bfeb5bbb06b..c57fb8273fe 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -169,7 +169,7 @@ INSERT INTO t2 VALUES (11416,11416,32767,0);
INSERT INTO t2 VALUES (11409,0,0,0);
CREATE TABLE t3 (
- id int(11) DEFAULT '0' NOT NULL auto_increment,
+ id int(11) NOT NULL auto_increment,
dni_pasaporte char(16) DEFAULT '' NOT NULL,
idPla int(11) DEFAULT '0' NOT NULL,
cod_asig int(11) DEFAULT '0' NOT NULL,
@@ -184,7 +184,7 @@ CREATE TABLE t3 (
INSERT INTO t3 VALUES (1,'11111111',1,10362,98,1,'M');
CREATE TABLE t4 (
- id int(11) DEFAULT '0' NOT NULL auto_increment,
+ id int(11) NOT NULL auto_increment,
papa int(11) DEFAULT '0' NOT NULL,
fill int(11) DEFAULT '0' NOT NULL,
idPla int(11) DEFAULT '0' NOT NULL,
@@ -211,7 +211,7 @@ drop table t1,t2,t3,test.t4;
#
CREATE TABLE t1 (
- id smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
+ id smallint(5) unsigned NOT NULL auto_increment,
name char(60) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
);
@@ -220,7 +220,7 @@ INSERT INTO t1 VALUES (2,'Lilliana Angelovska');
INSERT INTO t1 VALUES (3,'Thimble Smith');
CREATE TABLE t2 (
- id smallint(5) unsigned DEFAULT '0' NOT NULL auto_increment,
+ id smallint(5) unsigned NOT NULL auto_increment,
owner smallint(5) unsigned DEFAULT '0' NOT NULL,
name char(60),
PRIMARY KEY (id)
@@ -258,15 +258,15 @@ drop table t1;
#
CREATE TABLE t1 (
- t1_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t1_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t1_id)
);
CREATE TABLE t2 (
- t2_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t2_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t2_id)
);
CREATE TABLE t3 (
- t3_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t3_id bigint(21) NOT NULL auto_increment,
PRIMARY KEY (t3_id)
);
CREATE TABLE t4 (
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index f7677709ca4..8e1f304a5a5 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -25,7 +25,7 @@ INSERT INTO t1 VALUES (2,7,'60671569','Y');
INSERT INTO t1 VALUES (2,3,'dd','Y');
CREATE TABLE t2 (
- id int(6) DEFAULT '0' NOT NULL auto_increment,
+ id int(6) NOT NULL auto_increment,
description varchar(40) NOT NULL,
idform varchar(40),
ordre int(6) unsigned DEFAULT '0' NOT NULL,
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 47ea2d06d0a..243910bf64b 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -410,4 +410,17 @@ select * from t1;
show status like "Qcache_queries_in_cache";
load data infile '../../std_data/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
+drop table t1;
+
+#
+# INTO OUTFILE/DUMPFILE test
+#
+
+drop table if exists t1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3);
+show status like "Qcache_queries_in_cache";
+select * from t1 into outfile "query_caceh.out.file";
+select * from t1 limit 1 into dumpfile "query_cache.dump.file";
+show status like "Qcache_queries_in_cache";
drop table t1; \ No newline at end of file
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index 002aeaed9dc..9c00abe980b 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -130,7 +130,7 @@ drop table t1;
#
CREATE TABLE t1 (
- t1_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t1_id bigint(21) NOT NULL auto_increment,
_field_72 varchar(128) DEFAULT '' NOT NULL,
_field_95 varchar(32),
_field_115 tinyint(4) DEFAULT '0' NOT NULL,
@@ -161,7 +161,7 @@ INSERT INTO t2 VALUES (2,1);
INSERT INTO t2 VALUES (2,2);
CREATE TABLE t3 (
- t3_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t3_id bigint(21) NOT NULL auto_increment,
_field_131 varchar(128),
_field_133 tinyint(4) DEFAULT '0' NOT NULL,
_field_135 datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
@@ -196,7 +196,7 @@ INSERT INTO t4 VALUES (1,1);
INSERT INTO t4 VALUES (2,1);
CREATE TABLE t5 (
- t5_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t5_id bigint(21) NOT NULL auto_increment,
_field_149 tinyint(4),
_field_156 varchar(128) DEFAULT '' NOT NULL,
_field_157 varchar(128) DEFAULT '' NOT NULL,
@@ -228,7 +228,7 @@ INSERT INTO t6 VALUES (1,2);
INSERT INTO t6 VALUES (2,2);
CREATE TABLE t7 (
- t7_id bigint(21) DEFAULT '0' NOT NULL auto_increment,
+ t7_id bigint(21) NOT NULL auto_increment,
_field_143 tinyint(4),
_field_165 varchar(32),
_field_166 smallint(6) DEFAULT '0' NOT NULL,
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 9b10e8943ad..053d0517904 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -5,7 +5,7 @@ DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (
- id int(11) DEFAULT '0' NOT NULL auto_increment,
+ id int(11) NOT NULL auto_increment,
datatype_id int(11) DEFAULT '0' NOT NULL,
minvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL,
maxvalue decimal(20,10) DEFAULT '0.0000000000' NOT NULL,
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index 767012d0b34..ea7fa7be8c1 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -7,7 +7,7 @@ drop table if exists t1,t2,t3;
--enable_warnings
CREATE TABLE t1 (
- auto int(5) unsigned DEFAULT 0 NOT NULL auto_increment,
+ auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
@@ -93,7 +93,7 @@ select auto,new_field,new_blob_col,date_field from t1 ;
# check with old syntax
#
CREATE TABLE t2 (
- auto int(5) unsigned NOT NULL DEFAULT 0 auto_increment,
+ auto int(5) unsigned NOT NULL auto_increment,
string char(20),
mediumblob_col mediumblob not null,
new_field char(2),
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index 31d22c1f850..6a7eac41a96 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -75,7 +75,7 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','');
-alter table t1 change lfdnr lfdnr int(10) unsigned default 0 not null auto_increment;
+alter table t1 change lfdnr lfdnr int(10) unsigned not null auto_increment;
update t1 set status=1 where type='Open';
select status from t1;
drop table t1;
diff --git a/netware/BUILD/create-patch b/netware/BUILD/create-patch
new file mode 100644
index 00000000000..711eabf2d89
--- /dev/null
+++ b/netware/BUILD/create-patch
@@ -0,0 +1,56 @@
+#! /bin/sh
+
+# debug
+#set -x
+
+# stop on errors
+set -e
+
+# repository direcotry
+repo_dir=`pwd`
+
+# show usage
+show_usage()
+{
+ cat << EOF
+
+usage: create-patch
+
+Creates a patch file between the latest revision of the current tree
+and the latest revision not create by \$BK_USER.
+
+EOF
+ exit 0;
+}
+
+if test $1 || test -z $BK_USER
+then
+ show_usage
+fi
+
+echo "starting patch..."
+
+echo "user: $BK_USER"
+
+# check for bk and repo_dir
+bk help > /dev/null
+repo_dir=`bk root $repo_dir`
+cd $repo_dir
+
+# determine version
+version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
+echo "version: $version"
+
+# user revision
+user_rev=`bk changes -e -n -d':REV:' | head -1`
+echo "latest revision: $user_rev"
+
+# tree revision
+tree_rev=`bk changes -e -n -d':REV:' -U$BK_USER | head -1`
+echo "latest non-$BK_USER revision: $tree_rev"
+
+# create patch
+patch="$repo_dir/../$BK_USER-$version.patch"
+echo "creating \"$patch\"..."
+bk export -tpatch -r$tree_rev..$user_rev > $patch
+
diff --git a/netware/BUILD/mwenv b/netware/BUILD/mwenv
index d2b64409c88..26794c3f77f 100755
--- a/netware/BUILD/mwenv
+++ b/netware/BUILD/mwenv
@@ -1,9 +1,9 @@
#! /bin/sh
-# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be changed before compiling
+# WINE_BUILD_DIR, BUILD_DIR, and VERSION must be correct before compiling
# This values are normally changed by the nwbootstrap script
-# the default for WINE_BUILD_DIR is "F:/mydev"
+# the default is "F:/mydev"
export MYDEV="WINE_BUILD_DIR"
export MWCNWx86Includes="$MYDEV/libc/include"
@@ -12,16 +12,16 @@ export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib"
export WINEPATH="$MYDEV/mw/bin"
-# the default for BUILD_DIR is "$HOME/mydev"
+# the default added path is "$HOME/mydev/mysql-x.x-x/netware/BUILD"
export PATH="$PATH:BUILD_DIR/mysql-VERSION/netware/BUILD"
export AR='mwldnlm'
export AR_FLAGS='-type library -o'
export AS='mwasmnlm'
export CC='mwccnlm -gccincludes'
-export CFLAGS='-dialect c -proc 686 -bool on -relax_pointers -DUSE_OLD_FUNCTIONS'
+export CFLAGS='-dialect c -proc 686 -relax_pointers'
export CXX='mwccnlm -gccincludes'
-export CXXFLAGS='-dialect c++ -proc 686 -bool on -relax_pointers'
+export CXXFLAGS='-dialect c++ -proc 686 -bool on -wchar_t on -relax_pointers -D_WCHAR_T'
export LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption'
export RANLIB=:
diff --git a/netware/BUILD/nwbootstrap b/netware/BUILD/nwbootstrap
index a8ed956811e..002e19c8e49 100755
--- a/netware/BUILD/nwbootstrap
+++ b/netware/BUILD/nwbootstrap
@@ -129,7 +129,7 @@ else
fi
echo "creating ChangeLog..."
-bk changes -v -r$rev > $target_dir/ChangeLog
+bk changes -v -r$rev..$revision > $target_dir/ChangeLog
# add the latest manual
if test -d $doc_dir
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 5933340febb..801d144b968 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -28,12 +28,13 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlshow.def client/mysqltest.def \
extra/mysql_install.def extra/my_print_defaults.def \
extra/perror.def extra/replace.def \
- extra/resolveip.def isam/isamchk.def \
+ extra/resolveip.def extra/comp_err.def \
+ isam/isamchk.def \
isam/isamlog.def isam/pack_isam.def \
libmysqld/libmysqld.def myisam/myisamchk.def \
myisam/myisamlog.def myisam/myisampack.def \
- sql/mysqld.def sql/mysqld.xdc
-
+ sql/mysqld.def
+
link_sources:
set -x; \
for f in $(netware_build_files); do \
diff --git a/netware/comp_err.def b/netware/comp_err.def
new file mode 100644
index 00000000000..d694c07174a
--- /dev/null
+++ b/netware/comp_err.def
@@ -0,0 +1,10 @@
+#------------------------------------------------------------------------------
+# MySQL Error File Compiler
+#------------------------------------------------------------------------------
+MODULE libc.nlm
+COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
+DESCRIPTION "MySQL Error File Compiler"
+VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
+#DEBUG
+
diff --git a/netware/isamchk.def b/netware/isamchk.def
index a724340066a..8d756466609 100644
--- a/netware/isamchk.def
+++ b/netware/isamchk.def
@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/isamlog.def b/netware/isamlog.def
index 3f74d17f284..bb8312066ef 100644
--- a/netware/isamlog.def
+++ b/netware/isamlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Log Tool"
VERSION 4, 0
-DEBUG
+XDCDATA ../netware/mysql.xdc
+#DEBUG
diff --git a/netware/libmysql.def b/netware/libmysql.def
index f2ab1f0f21a..7804c4468a5 100644
--- a/netware/libmysql.def
+++ b/netware/libmysql.def
@@ -7,4 +7,5 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Client Library"
VERSION 4, 0
AUTOUNLOAD
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/my_manage.c b/netware/my_manage.c
index 25147b16674..490438b0485 100644
--- a/netware/my_manage.c
+++ b/netware/my_manage.c
@@ -21,7 +21,7 @@
#include <dirent.h>
#include <string.h>
#include <screen.h>
-#include <nks/vm.h>
+#include <proc.h>
#include <ctype.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -54,18 +54,16 @@
Init an argument list.
******************************************************************************/
-void _init_args(arg_list *al)
+void init_args(arg_list_t *al)
{
- int i;
+ ASSERT(al != NULL);
- *al = malloc(sizeof(arg_list_t));
+ al->argc = 0;
+ al->size = ARG_BUF;
+ al->argv = malloc(al->size * sizeof(char *));
+ ASSERT(al->argv != NULL);
- (*al)->argc = 0;
-
- for(i = 0; i < ARG_MAX; i++)
- {
- (*al)->argv[i] = NULL;
- }
+ return;
}
/******************************************************************************
@@ -75,49 +73,66 @@ void _init_args(arg_list *al)
Add an argument to a list.
******************************************************************************/
-void add_arg(arg_list al, char *format, ...)
+void add_arg(arg_list_t *al, char *format, ...)
{
va_list ap;
+ char temp[PATH_MAX];
ASSERT(al != NULL);
- ASSERT(al->argc < ARG_MAX);
- al->argv[al->argc] = malloc(PATH_MAX);
-
- ASSERT(al->argv[al->argc] != NULL);
+ // increase size
+ if (al->argc >= al->size)
+ {
+ al->size += ARG_BUF;
+ al->argv = realloc(al->argv, al->size * sizeof(char *));
+ ASSERT(al->argv != NULL);
+ }
- va_start(ap, format);
+ if (format)
+ {
+ va_start(ap, format);
+ vsprintf(temp, format, ap);
+ va_end(ap);
- vsprintf(al->argv[al->argc], format, ap);
+ al->argv[al->argc] = malloc(strlen(temp)+1);
+ ASSERT(al->argv[al->argc] != NULL);
+ strcpy(al->argv[al->argc], temp);
- va_end(ap);
+ ++(al->argc);
+ }
+ else
+ {
+ al->argv[al->argc] = NULL;
+ }
- ++(al->argc);
+ return;
}
/******************************************************************************
- _free_args()
+ free_args()
Free an argument list.
******************************************************************************/
-void _free_args(arg_list *al)
+void free_args(arg_list_t *al)
{
int i;
ASSERT(al != NULL);
- ASSERT(*al != NULL);
- for(i = 0; i < (*al)->argc; i++)
+ for(i = 0; i < al->argc; i++)
{
- ASSERT((*al)->argv[i] != NULL);
- free((*al)->argv[i]);
- (*al)->argv[i] = NULL;
+ ASSERT(al->argv[i] != NULL);
+ free(al->argv[i]);
+ al->argv[i] = NULL;
}
- free(*al);
- *al = NULL;
+ free(al->argv);
+ al->argc = 0;
+ al->argv = NULL;
+
+ return;
}
/******************************************************************************
@@ -167,7 +182,7 @@ int sleep_until_file_exists(char *pid_file)
******************************************************************************/
int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
{
- arg_list al;
+ arg_list_t al;
int err, i;
char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX];
@@ -177,27 +192,27 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args
- init_args(al);
- add_arg(al, "%s", mysqladmin_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", port);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "--silent");
- add_arg(al, "-O");
- add_arg(al, "connect_timeout=10");
- add_arg(al, "-w");
- add_arg(al, "--host=localhost");
- add_arg(al, "ping");
+ init_args(&al);
+ add_arg(&al, "%s", mysqladmin_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", port);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "--silent");
+ add_arg(&al, "-O");
+ add_arg(&al, "connect_timeout=10");
+ add_arg(&al, "-w");
+ add_arg(&al, "--host=localhost");
+ add_arg(&al, "ping");
// NetWare does not support the connect timeout in the TCP/IP stack
// -- we will try the ping multiple times
for(i = 0; (i < TRY_MAX)
- && (err = spawn(mysqladmin_file, al, TRUE, NULL,
+ && (err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)); i++) sleep(1);
// free args
- free_args(al);
+ free_args(&al);
return err;
}
@@ -206,71 +221,53 @@ int wait_for_server_start(char *bin_dir, char *user, char *password, int port)
spawn()
- Spawn the given file with the given arguments.
+ Spawn the given path with the given arguments.
******************************************************************************/
-int spawn(char *file, arg_list al, int join, char *input,
+int spawn(char *path, arg_list_t *al, int join, char *input,
char *output, char *error)
{
- NXNameSpec_t name;
- NXExecEnvSpec_t env;
- NXVmId_t vm, ignore;
- int result;
-
- // name
- name.ssType = NX_OBJ_FILE;
- name.ssPathCtx = 0;
- name.ssPath = file;
-
- // env
- env.esArgc = al->argc;
- env.esArgv = al->argv;
- env.esEnv = NULL;
-
- env.esStdin.ssPathCtx = 0;
- env.esStdout.ssPathCtx = 0;
- env.esStderr.ssPathCtx = 0;
-
- if (input == NULL)
- {
- env.esStdin.ssType = NX_OBJ_DEFAULT;
- env.esStdin.ssPath = NULL;
- }
- else
- {
- env.esStdin.ssType = NX_OBJ_FILE;
- env.esStdin.ssPath = input;
- }
-
- if (output == NULL)
- {
- env.esStdout.ssType = NX_OBJ_DEFAULT;
- env.esStdout.ssPath = NULL;
- }
- else
- {
- env.esStdout.ssType = NX_OBJ_FILE;
- env.esStdout.ssPath = output;
- }
-
- if (error == NULL)
+ pid_t pid;
+ int result = 0;
+ wiring_t wiring = { FD_UNUSED, FD_UNUSED, FD_UNUSED };
+ unsigned long flags = PROC_CURRENT_SPACE | PROC_INHERIT_CWD;
+
+ // open wiring
+ if (input)
+ wiring.infd = open(input, O_RDONLY);
+
+ if (output)
+ wiring.outfd = open(output, O_WRONLY | O_CREAT | O_TRUNC);
+
+ if (error)
+ wiring.errfd = open(error, O_WRONLY | O_CREAT | O_TRUNC);
+
+ // procve requires a NULL
+ add_arg(al, NULL);
+
+ // go
+ pid = procve(path, flags, NULL, &wiring, NULL, NULL, 0,
+ NULL, (const char **)al->argv);
+
+ if (pid == -1)
{
- env.esStderr.ssType = NX_OBJ_DEFAULT;
- env.esStderr.ssPath = NULL;
+ result = -1;
}
- else
+ else if (join)
{
- env.esStderr.ssType = NX_OBJ_FILE;
- env.esStderr.ssPath = error;
+ waitpid(pid, &result, 0);
}
- result = NXVmSpawn(&name, &env, NX_VM_SAME_ADDRSPACE | NX_VM_INHERIT_ENV, &vm);
-
- if (!result && join)
- {
- NXVmJoin(vm, &ignore, &result);
- }
-
+ // close wiring
+ if (wiring.infd != -1)
+ close(wiring.infd);
+
+ if (wiring.outfd != -1)
+ close(wiring.outfd);
+
+ if (wiring.errfd != -1)
+ close(wiring.errfd);
+
return result;
}
@@ -284,7 +281,7 @@ int spawn(char *file, arg_list al, int join, char *input,
int stop_server(char *bin_dir, char *user, char *password, int port,
char *pid_file)
{
- arg_list al;
+ arg_list_t al;
int err, i, argc = 0;
char mysqladmin_file[PATH_MAX];
char trash[PATH_MAX];
@@ -294,18 +291,18 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
snprintf(trash, PATH_MAX, "/tmp/trash.out");
// args
- init_args(al);
- add_arg(al, "%s", mysqladmin_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", port);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "-O");
- add_arg(al, "shutdown_timeout=20");
- add_arg(al, "shutdown");
+ init_args(&al);
+ add_arg(&al, "%s", mysqladmin_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", port);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "-O");
+ add_arg(&al, "shutdown_timeout=20");
+ add_arg(&al, "shutdown");
// spawn
- if ((err = spawn(mysqladmin_file, al, TRUE, NULL,
+ if ((err = spawn(mysqladmin_file, &al, TRUE, NULL,
trash, NULL)) == 0)
{
sleep_until_file_deleted(pid_file);
@@ -324,7 +321,7 @@ int stop_server(char *bin_dir, char *user, char *password, int port,
}
// free args
- free_args(al);
+ free_args(&al);
return err;
}
diff --git a/netware/my_manage.h b/netware/my_manage.h
index 92ed66ea865..b19662c4ee9 100644
--- a/netware/my_manage.h
+++ b/netware/my_manage.h
@@ -34,12 +34,9 @@
******************************************************************************/
-#define ARG_MAX 50
+#define ARG_BUF 10
#define TRY_MAX 5
-#define init_args(al) _init_args(&al);
-#define free_args(al) _free_args(&al);
-
/******************************************************************************
structures
@@ -50,9 +47,11 @@ typedef struct
{
int argc;
- char *argv[ARG_MAX];
+ char **argv;
+
+ size_t size;
-} arg_list_t, * arg_list;
+} arg_list_t;
/******************************************************************************
@@ -66,18 +65,23 @@ typedef struct
******************************************************************************/
-void _init_args(arg_list *);
-void add_arg(arg_list, char *, ...);
-void _free_args(arg_list *);
+void init_args(arg_list_t *);
+void add_arg(arg_list_t *, char *, ...);
+void free_args(arg_list_t *);
+
int sleep_until_file_exists(char *);
int sleep_until_file_deleted(char *);
int wait_for_server_start(char *, char *, char *, int);
-int spawn(char *, arg_list, int, char *, char *, char *);
+
+int spawn(char *, arg_list_t *, int, char *, char *, char *);
+
int stop_server(char *, char *, char *, int, char *);
pid_t get_server_pid(char *);
void kill_server(pid_t pid);
+
void del_tree(char *);
int removef(char *, ...);
+
void get_basedir(char *, char *);
#endif /* _MY_MANAGE */
diff --git a/netware/my_print_defaults.def b/netware/my_print_defaults.def
index 7f474c50469..49f167341ae 100644
--- a/netware/my_print_defaults.def
+++ b/netware/my_print_defaults.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Print Defaults Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamchk.def b/netware/myisamchk.def
index 5a57866c1ee..2222a1317e1 100644
--- a/netware/myisamchk.def
+++ b/netware/myisamchk.def
@@ -6,5 +6,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamlog.def b/netware/myisamlog.def
index c3bbee38d16..bfa673e12be 100644
--- a/netware/myisamlog.def
+++ b/netware/myisamlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisampack.def b/netware/myisampack.def
index ae025e5f84d..72403d2591e 100644
--- a/netware/myisampack.def
+++ b/netware/myisampack.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql.def b/netware/mysql.def
index a5e3ae21369..9b4424ed4fb 100644
--- a/netware/mysql.def
+++ b/netware/mysql.def
@@ -7,5 +7,6 @@ COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved
DESCRIPTION "MySQL Monitor"
VERSION 4, 0
MULTIPLE
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_install.def b/netware/mysql_install.def
index 2c2819ec6af..87fc76919f9 100644
--- a/netware/mysql_install.def
+++ b/netware/mysql_install.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Install Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_install_db.c b/netware/mysql_install_db.c
index 128f07dc2bc..b4060bfdb7e 100644
--- a/netware/mysql_install_db.c
+++ b/netware/mysql_install_db.c
@@ -24,6 +24,7 @@
#include <strings.h>
#include <getopt.h>
#include <screen.h>
+#include <errno.h>
#include "my_config.h"
#include "my_manage.h"
@@ -51,7 +52,7 @@ char default_option[PATH_MAX];
void start_defaults(int, char*[]);
void finish_defaults();
-void read_defaults(arg_list);
+void read_defaults(arg_list_t *);
void parse_args(int, char*[]);
void get_options(int, char*[]);
void create_paths();
@@ -151,9 +152,9 @@ void finish_defaults()
Read the defaults.
******************************************************************************/
-void read_defaults(arg_list pal)
+void read_defaults(arg_list_t *pal)
{
- arg_list al;
+ arg_list_t al;
char defaults_file[PATH_MAX];
char mydefaults[PATH_MAX];
char line[PATH_MAX];
@@ -167,15 +168,15 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args
- init_args(al);
- add_arg(al, mydefaults);
- if (default_option[0]) add_arg(al, default_option);
- add_arg(al, "mysqld");
- add_arg(al, "mysql_install_db");
+ init_args(&al);
+ add_arg(&al, mydefaults);
+ if (default_option[0]) add_arg(&al, default_option);
+ add_arg(&al, "mysqld");
+ add_arg(&al, "mysql_install_db");
- spawn(mydefaults, al, TRUE, NULL, defaults_file, NULL);
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
- free_args(al);
+ free_args(&al);
// gather defaults
if((fp = fopen(defaults_file, "r")) != NULL)
@@ -267,17 +268,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/
void get_options(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
// start defaults
start_defaults(argc, argv);
// default file arguments
- init_args(al);
- add_arg(al, "dummy");
- read_defaults(al);
- parse_args(al->argc, al->argv);
- free_args(al);
+ init_args(&al);
+ add_arg(&al, "ignore");
+ read_defaults(&al);
+ parse_args(al.argc, al.argv);
+ free_args(&al);
// command-line arguments
parse_args(argc, argv);
@@ -323,7 +324,7 @@ void create_paths()
******************************************************************************/
int mysql_install_db(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
int i, j, err;
char skip;
@@ -336,8 +337,8 @@ int mysql_install_db(int argc, char *argv[])
};
// args
- init_args(al);
- add_arg(al, "%s", mysqld);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld);
// parent args
for(i = 1; i < argc; i++)
@@ -354,19 +355,19 @@ int mysql_install_db(int argc, char *argv[])
}
}
- if (!skip) add_arg(al, "%s", argv[i]);
+ if (!skip) add_arg(&al, "%s", argv[i]);
}
- add_arg(al, "--bootstrap");
- add_arg(al, "--skip-grant-tables");
- add_arg(al, "--skip-innodb");
- add_arg(al, "--skip-bdb");
+ add_arg(&al, "--bootstrap");
+ add_arg(&al, "--skip-grant-tables");
+ add_arg(&al, "--skip-innodb");
+ add_arg(&al, "--skip-bdb");
// spawn mysqld
- err = spawn(mysqld, al, TRUE, sql_file, out_log, err_log);
+ err = spawn(mysqld, &al, TRUE, sql_file, out_log, err_log);
// free args
- free_args(al);
+ free_args(&al);
return err;
}
@@ -384,6 +385,9 @@ int main(int argc, char **argv)
// check for an autoclose option
if (!autoclose) setscreenmode(SCR_NO_MODE);
+ // header
+ printf("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+
// create paths
create_paths();
@@ -391,6 +395,7 @@ int main(int argc, char **argv)
if (mysql_install_db(argc, argv))
{
printf("ERROR - The database creation failed!\n");
+ printf(" %s\n", strerror(errno));
printf("See the following log for more infomration:\n");
printf("\t%s\n\n", err_log);
exit(-1);
diff --git a/netware/mysql_install_db.def b/netware/mysql_install_db.def
index c813e80d768..4653638b5ad 100644
--- a/netware/mysql_install_db.def
+++ b/netware/mysql_install_db.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Install"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Initial Database Installer"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c
index f19cee32e92..ff629546793 100644
--- a/netware/mysql_test_run.c
+++ b/netware/mysql_test_run.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <fcntl.h>
+#include "my_config.h"
#include "my_manage.h"
/******************************************************************************
@@ -178,7 +179,7 @@ void report_stats()
******************************************************************************/
void install_db(char *datadir)
{
- arg_list al;
+ arg_list_t al;
int err, i;
char input[PATH_MAX];
char output[PATH_MAX];
@@ -190,23 +191,23 @@ void install_db(char *datadir)
snprintf(error, PATH_MAX, "%s/install.err", datadir);
// args
- init_args(al);
- add_arg(al, mysqld_file);
- add_arg(al, "--bootstrap");
- add_arg(al, "--skip-grant-tables");
- add_arg(al, "--basedir=%s", base_dir);
- add_arg(al, "--datadir=%s", datadir);
- add_arg(al, "--skip-innodb");
- add_arg(al, "--skip-bdb");
+ init_args(&al);
+ add_arg(&al, mysqld_file);
+ add_arg(&al, "--bootstrap");
+ add_arg(&al, "--skip-grant-tables");
+ add_arg(&al, "--basedir=%s", base_dir);
+ add_arg(&al, "--datadir=%s", datadir);
+ add_arg(&al, "--skip-innodb");
+ add_arg(&al, "--skip-bdb");
// spawn
- if ((err = spawn(mysqld_file, al, TRUE, input, output, error)) != 0)
+ if ((err = spawn(mysqld_file, &al, TRUE, input, output, error)) != 0)
{
die("Unable to create database.");
}
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -261,7 +262,7 @@ void mysql_install_db()
******************************************************************************/
void start_master()
{
- arg_list al;
+ arg_list_t al;
int err, i;
char master_out[PATH_MAX];
char master_err[PATH_MAX];
@@ -297,32 +298,32 @@ void start_master()
mysql_test_dir, restarts);
// args
- init_args(al);
- add_arg(al, "%s", mysqld_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--log-bin=master-bin");
- add_arg(al, "--server-id=1");
- add_arg(al, "--basedir=%s", base_dir);
- add_arg(al, "--port=%u", master_port);
- add_arg(al, "--local-infile");
- add_arg(al, "--core");
- add_arg(al, "--datadir=%s", master_dir);
- add_arg(al, "--pid-file=%s", master_pid);
- add_arg(al, "--character-sets-dir=%s", char_dir);
- add_arg(al, "--tmpdir=%s", mysql_tmp_dir);
- add_arg(al, "--language=%s", lang_dir);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--log-bin=master-bin");
+ add_arg(&al, "--server-id=1");
+ add_arg(&al, "--basedir=%s", base_dir);
+ add_arg(&al, "--port=%u", master_port);
+ add_arg(&al, "--local-infile");
+ add_arg(&al, "--core");
+ add_arg(&al, "--datadir=%s", master_dir);
+ add_arg(&al, "--pid-file=%s", master_pid);
+ add_arg(&al, "--character-sets-dir=%s", char_dir);
+ add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
+ add_arg(&al, "--language=%s", lang_dir);
// $MASTER_40_ARGS
- add_arg(al, "--rpl-recovery-rank=1");
- add_arg(al, "--init-rpl-role=master");
+ add_arg(&al, "--rpl-recovery-rank=1");
+ add_arg(&al, "--init-rpl-role=master");
// $SMALL_SERVER
- add_arg(al, "-O");
- add_arg(al, "key_buffer_size=1M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=256K");
- add_arg(al, "-O");
- add_arg(al, "max_heap_table_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=256K");
+ add_arg(&al, "-O");
+ add_arg(&al, "max_heap_table_size=1M");
// $EXTRA_MASTER_OPT
if (master_opt[0] != NULL)
@@ -333,7 +334,7 @@ void start_master()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
@@ -343,7 +344,7 @@ void start_master()
remove(master_pid);
// spawn
- if ((err = spawn(mysqld_file, al, FALSE, NULL, master_out, master_err)) == 0)
+ if ((err = spawn(mysqld_file, &al, FALSE, NULL, master_out, master_err)) == 0)
{
sleep_until_file_exists(master_pid);
@@ -362,7 +363,7 @@ void start_master()
}
// free_args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -374,7 +375,7 @@ void start_master()
******************************************************************************/
void start_slave()
{
- arg_list al;
+ arg_list_t al;
int err, i;
char slave_out[PATH_MAX];
char slave_err[PATH_MAX];
@@ -444,34 +445,34 @@ void start_slave()
mysql_test_dir, restarts);
// args
- init_args(al);
- add_arg(al, "%s", mysqld_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--log-bin=slave-bin");
- add_arg(al, "--relay_log=slave-relay-bin");
- add_arg(al, "--basedir=%s", base_dir);
- add_arg(al, "--port=%u", slave_port);
- add_arg(al, "--datadir=%s", slave_dir);
- add_arg(al, "--pid-file=%s", slave_pid);
- add_arg(al, "--character-sets-dir=%s", char_dir);
- add_arg(al, "--core");
- add_arg(al, "--tmpdir=%s", mysql_tmp_dir);
- add_arg(al, "--language=%s", lang_dir);
-
- add_arg(al, "--exit-info=256");
- add_arg(al, "--log-slave-updates");
- add_arg(al, "--init-rpl-role=slave");
- add_arg(al, "--skip-innodb");
- add_arg(al, "--skip-slave-start");
- add_arg(al, "--slave-load-tmpdir=../../var/tmp");
-
- add_arg(al, "--report-user=%s", user);
- add_arg(al, "--report-host=127.0.0.1");
- add_arg(al, "--report-port=%u", slave_port);
-
- add_arg(al, "--master-retry-count=10");
- add_arg(al, "-O");
- add_arg(al, "slave_net_timeout=10");
+ init_args(&al);
+ add_arg(&al, "%s", mysqld_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--log-bin=slave-bin");
+ add_arg(&al, "--relay_log=slave-relay-bin");
+ add_arg(&al, "--basedir=%s", base_dir);
+ add_arg(&al, "--port=%u", slave_port);
+ add_arg(&al, "--datadir=%s", slave_dir);
+ add_arg(&al, "--pid-file=%s", slave_pid);
+ add_arg(&al, "--character-sets-dir=%s", char_dir);
+ add_arg(&al, "--core");
+ add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
+ add_arg(&al, "--language=%s", lang_dir);
+
+ add_arg(&al, "--exit-info=256");
+ add_arg(&al, "--log-slave-updates");
+ add_arg(&al, "--init-rpl-role=slave");
+ add_arg(&al, "--skip-innodb");
+ add_arg(&al, "--skip-slave-start");
+ add_arg(&al, "--slave-load-tmpdir=../../var/tmp");
+
+ add_arg(&al, "--report-user=%s", user);
+ add_arg(&al, "--report-host=127.0.0.1");
+ add_arg(&al, "--report-port=%u", slave_port);
+
+ add_arg(&al, "--master-retry-count=10");
+ add_arg(&al, "-O");
+ add_arg(&al, "slave_net_timeout=10");
// slave master info
if (slave_master_info[0] != NULL)
@@ -482,29 +483,29 @@ void start_slave()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
}
else
{
- add_arg(al, "--master-user=%s", user);
- add_arg(al, "--master-password=%s", password);
- add_arg(al, "--master-host=127.0.0.1");
- add_arg(al, "--master-port=%u", master_port);
- add_arg(al, "--master-connect-retry=1");
- add_arg(al, "--server-id=2");
- add_arg(al, "--rpl-recovery-rank=2");
+ add_arg(&al, "--master-user=%s", user);
+ add_arg(&al, "--master-password=%s", password);
+ add_arg(&al, "--master-host=127.0.0.1");
+ add_arg(&al, "--master-port=%u", master_port);
+ add_arg(&al, "--master-connect-retry=1");
+ add_arg(&al, "--server-id=2");
+ add_arg(&al, "--rpl-recovery-rank=2");
}
// small server
- add_arg(al, "-O");
- add_arg(al, "key_buffer_size=1M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=256K");
- add_arg(al, "-O");
- add_arg(al, "max_heap_table_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer_size=1M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=256K");
+ add_arg(&al, "-O");
+ add_arg(&al, "max_heap_table_size=1M");
// opt args
if (slave_opt[0] != NULL)
@@ -515,7 +516,7 @@ void start_slave()
while(p)
{
- add_arg(al, "%s", p);
+ add_arg(&al, "%s", p);
p = (char *)strtok(NULL, " \t");
}
@@ -525,7 +526,7 @@ void start_slave()
remove(slave_pid);
// spawn
- if ((err = spawn(mysqld_file, al, FALSE, NULL, slave_out, slave_err)) == 0)
+ if ((err = spawn(mysqld_file, &al, FALSE, NULL, slave_out, slave_err)) == 0)
{
sleep_until_file_exists(slave_pid);
@@ -544,7 +545,7 @@ void start_slave()
}
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
@@ -749,7 +750,7 @@ void run_test(char *test)
char out_file[PATH_MAX];
char err_file[PATH_MAX];
int err;
- arg_list al;
+ arg_list_t al;
NXTime_t start, stop;
// skip slave?
@@ -812,25 +813,25 @@ void run_test(char *test)
log("%-46s ", test);
// args
- init_args(al);
- add_arg(al, "%s", mysqltest_file);
- add_arg(al, "--no-defaults");
- add_arg(al, "--port=%u", master_port);
- add_arg(al, "--database=%s", db);
- add_arg(al, "--user=%s", user);
- add_arg(al, "--password=%s", password);
- add_arg(al, "--silent");
- add_arg(al, "--basedir=%s/", mysql_test_dir);
- add_arg(al, "--host=127.0.0.1");
- add_arg(al, "-v");
- add_arg(al, "-R");
- add_arg(al, "%s", result_file);
+ init_args(&al);
+ add_arg(&al, "%s", mysqltest_file);
+ add_arg(&al, "--no-defaults");
+ add_arg(&al, "--port=%u", master_port);
+ add_arg(&al, "--database=%s", db);
+ add_arg(&al, "--user=%s", user);
+ add_arg(&al, "--password=%s", password);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--basedir=%s/", mysql_test_dir);
+ add_arg(&al, "--host=127.0.0.1");
+ add_arg(&al, "-v");
+ add_arg(&al, "-R");
+ add_arg(&al, "%s", result_file);
// start timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &start);
// spawn
- err = spawn(mysqltest_file, al, TRUE, test_file, out_file, err_file);
+ err = spawn(mysqltest_file, &al, TRUE, test_file, out_file, err_file);
// stop timer
NXGetTime(NX_SINCE_BOOT, NX_USECONDS, &stop);
@@ -840,7 +841,7 @@ void run_test(char *test)
total_time += elapsed;
// free args
- free_args(al);
+ free_args(&al);
if (err == 0)
{
@@ -1055,9 +1056,6 @@ void setup(char *file)
// enviornment
setenv("MYSQL_TEST_DIR", mysql_test_dir, 1);
-
- // install test databases
- mysql_install_db();
}
/******************************************************************************
@@ -1067,11 +1065,17 @@ void setup(char *file)
******************************************************************************/
int main(int argc, char **argv)
{
- log("Initializing Tests...\n");
-
// setup
setup(argv[0]);
+ // header
+ log("MySQL Server %s, for %s (%s)\n\n", VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+
+ log("Initializing Tests...\n");
+
+ // install test databases
+ mysql_install_db();
+
log("Starting Tests...\n");
log("\n");
diff --git a/netware/mysql_test_run.def b/netware/mysql_test_run.def
index 7cca2e1dea6..b34f62a1f91 100644
--- a/netware/mysql_test_run.def
+++ b/netware/mysql_test_run.def
@@ -7,4 +7,5 @@ SCREENNAME "MySQL Test Run"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Run"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqladmin.def b/netware/mysqladmin.def
index 02ea42a2343..0ace36992b1 100644
--- a/netware/mysqladmin.def
+++ b/netware/mysqladmin.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Admin"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlbinlog.def b/netware/mysqlbinlog.def
index b62ce4a578f..74d8e168b00 100644
--- a/netware/mysqlbinlog.def
+++ b/netware/mysqlbinlog.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlcheck.def b/netware/mysqlcheck.def
index ae554bc6a06..6e476556ffe 100644
--- a/netware/mysqlcheck.def
+++ b/netware/mysqlcheck.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld.def b/netware/mysqld.def
index d2ee41955ba..6856aefe56c 100644
--- a/netware/mysqld.def
+++ b/netware/mysqld.def
@@ -2,11 +2,11 @@
# MySQL Server
#------------------------------------------------------------------------------
MODULE libc.nlm
-XDCDATA mysqld.xdc
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server"
VERSION 4, 0
MULTIPLE
STACKSIZE 65536
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld_safe.c b/netware/mysqld_safe.c
index 1ab90775e02..845797e0022 100644
--- a/netware/mysqld_safe.c
+++ b/netware/mysqld_safe.c
@@ -60,7 +60,7 @@ void vlog(char *, va_list);
void log(char *, ...);
void start_defaults(int, char*[]);
void finish_defaults();
-void read_defaults(arg_list);
+void read_defaults(arg_list_t *);
void parse_args(int, char*[]);
void get_options(int, char*[]);
void check_data_vol();
@@ -249,9 +249,9 @@ void finish_defaults()
Read the defaults.
******************************************************************************/
-void read_defaults(arg_list pal)
+void read_defaults(arg_list_t *pal)
{
- arg_list al;
+ arg_list_t al;
char defaults_file[PATH_MAX];
char mydefaults[PATH_MAX];
char line[PATH_MAX];
@@ -265,17 +265,17 @@ void read_defaults(arg_list pal)
snprintf(mydefaults, PATH_MAX, "%s/bin/my_print_defaults", basedir);
// args
- init_args(al);
- add_arg(al, mydefaults);
- if (default_option[0]) add_arg(al, default_option);
- add_arg(al, "mysqld");
- add_arg(al, "server");
- add_arg(al, "mysqld_safe");
- add_arg(al, "safe_mysqld");
+ init_args(&al);
+ add_arg(&al, mydefaults);
+ if (default_option[0]) add_arg(&al, default_option);
+ add_arg(&al, "mysqld");
+ add_arg(&al, "server");
+ add_arg(&al, "mysqld_safe");
+ add_arg(&al, "safe_mysqld");
- spawn(mydefaults, al, TRUE, NULL, defaults_file, NULL);
+ spawn(mydefaults, &al, TRUE, NULL, defaults_file, NULL);
- free_args(al);
+ free_args(&al);
// gather defaults
if((fp = fopen(defaults_file, "r")) != NULL)
@@ -405,17 +405,17 @@ void parse_args(int argc, char *argv[])
******************************************************************************/
void get_options(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
// start defaults
start_defaults(argc, argv);
// default file arguments
- init_args(al);
- add_arg(al, "ignore");
- read_defaults(al);
- parse_args(al->argc, al->argv);
- free_args(al);
+ init_args(&al);
+ add_arg(&al, "ignore");
+ read_defaults(&al);
+ parse_args(al.argc, al.argv);
+ free_args(&al);
// command-line arguments
parse_args(argc, argv);
@@ -504,7 +504,7 @@ void check_setup()
******************************************************************************/
void check_tables()
{
- arg_list al;
+ arg_list_t al;
char mycheck[PATH_MAX];
char table[PATH_MAX];
char db[PATH_MAX];
@@ -549,21 +549,21 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/myisamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "--fast");
- add_arg(al, "--medium-check");
- add_arg(al, "-O");
- add_arg(al, "key_buffer=64M");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
-
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
-
- free_args(al);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "--fast");
+ add_arg(&al, "--medium-check");
+ add_arg(&al, "-O");
+ add_arg(&al, "key_buffer=64M");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
+
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
+
+ free_args(&al);
}
else if (strindex(table, ".ism"))
{
@@ -573,17 +573,17 @@ void check_tables()
snprintf(mycheck, PATH_MAX, "%s/bin/isamchk", basedir);
// args
- init_args(al);
- add_arg(al, mycheck);
- add_arg(al, "--silent");
- add_arg(al, "--force");
- add_arg(al, "-O");
- add_arg(al, "sort_buffer=64M");
- add_arg(al, table);
+ init_args(&al);
+ add_arg(&al, mycheck);
+ add_arg(&al, "--silent");
+ add_arg(&al, "--force");
+ add_arg(&al, "-O");
+ add_arg(&al, "sort_buffer=64M");
+ add_arg(&al, table);
- spawn(mycheck, al, TRUE, NULL, NULL, NULL);
+ spawn(mycheck, &al, TRUE, NULL, NULL, NULL);
- free_args(al);
+ free_args(&al);
}
}
}
@@ -599,7 +599,7 @@ void check_tables()
******************************************************************************/
void mysql_start(int argc, char *argv[])
{
- arg_list al;
+ arg_list_t al;
int i, j, err;
struct stat info;
time_t cal;
@@ -619,8 +619,8 @@ void mysql_start(int argc, char *argv[])
};
// args
- init_args(al);
- add_arg(al, "%s", mysqld);
+ init_args(&al);
+ add_arg(&al, "%s", mysqld);
// parent args
for(i = 1; i < argc; i++)
@@ -637,7 +637,7 @@ void mysql_start(int argc, char *argv[])
}
}
- if (!skip) add_arg(al, "%s", argv[i]);
+ if (!skip) add_arg(&al, "%s", argv[i]);
}
// spawn
@@ -653,7 +653,7 @@ void mysql_start(int argc, char *argv[])
log("mysql started : %s\n", stamp);
// spawn mysqld
- spawn(mysqld, al, TRUE, NULL, NULL, err_log);
+ spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
}
while (!stat(pid_file, &info));
@@ -664,7 +664,7 @@ void mysql_start(int argc, char *argv[])
log("mysql stopped : %s\n\n", stamp);
// free args
- free_args(al);
+ free_args(&al);
}
/******************************************************************************
diff --git a/netware/mysqld_safe.def b/netware/mysqld_safe.def
index 36a8c1cd89e..9080ef783c9 100644
--- a/netware/mysqld_safe.def
+++ b/netware/mysqld_safe.def
@@ -6,5 +6,7 @@ SCREENNAME "MySQL Database Server"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server Monitor"
VERSION 4, 0
+MULTIPLE
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqldump.def b/netware/mysqldump.def
index 763097a338c..f267b60ff77 100644
--- a/netware/mysqldump.def
+++ b/netware/mysqldump.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlimport.def b/netware/mysqlimport.def
index 990e704b73d..69e9f6eada5 100644
--- a/netware/mysqlimport.def
+++ b/netware/mysqlimport.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlshow.def b/netware/mysqlshow.def
index 2849def8109..2b41386f643 100644
--- a/netware/mysqlshow.def
+++ b/netware/mysqlshow.def
@@ -6,5 +6,6 @@ SCREENNAME "MySQL Show"
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqltest.def b/netware/mysqltest.def
index c4fadf141c6..d98f6436a4a 100644
--- a/netware/mysqltest.def
+++ b/netware/mysqltest.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Case Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/pack_isam.def b/netware/pack_isam.def
index 0e077be6f00..f0f5a7e328a 100644
--- a/netware/pack_isam.def
+++ b/netware/pack_isam.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Pack Tool"
VERSION 4, 0
-DEBUG
+XDCDATA ../netware/mysql.xdc
+#DEBUG
diff --git a/netware/perror.def b/netware/perror.def
index 08725a515ef..f1d23715f55 100644
--- a/netware/perror.def
+++ b/netware/perror.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error Code Description Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/replace.def b/netware/replace.def
index b639d40f58b..b55690152b9 100644
--- a/netware/replace.def
+++ b/netware/replace.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Text Replacement Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/resolveip.def b/netware/resolveip.def
index fc6ee0fa313..10b99304e22 100644
--- a/netware/resolveip.def
+++ b/netware/resolveip.def
@@ -5,5 +5,6 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL IP/Hostname Resolve Tool"
VERSION 4, 0
+XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh
index 82c8a3a90e4..79090e3e6db 100644
--- a/sql-bench/crash-me.sh
+++ b/sql-bench/crash-me.sh
@@ -2178,6 +2178,20 @@ report("views","views",
save_config_data('foreign_key',$result,"foreign keys");
}
+if ($limits{'foreign_key'} eq 'yes')
+{
+ report("allows to update of foreign key values",'foreign_update',
+ "create table crash_me1 (a int not null primary key)",
+ "create table crash_me2 (a int not null," .
+ " foreign key (a) references crash_me1 (a))",
+ "insert into crash_me1 values (1)",
+ "insert into crash_me2 values (1)",
+ "update crash_me1 set a = 2", ## <- must fail
+ "drop table crash_me2 $drop_attr",
+ "drop table crash_me1 $drop_attr"
+ );
+}
+
report("Create SCHEMA","create_schema",
"create schema crash_schema create table crash_q (a int) ".
"create table crash_q2(b int)",
diff --git a/sql-bench/limits/mysql.cfg b/sql-bench/limits/mysql.cfg
index 01614741dcd..cebb85d8dfd 100644
--- a/sql-bench/limits/mysql.cfg
+++ b/sql-bench/limits/mysql.cfg
@@ -1,4 +1,4 @@
-#This file is automaticly generated by crash-me 1.60
+#This file is automaticly generated by crash-me 1.61
NEG=yes # update of column= -column
###< create table crash_q (a integer)
@@ -177,7 +177,7 @@ compute=no # Compute
###> execute error:You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'compute sum(a) by a' at line 1
###
###As far as some queries didnt return OK, result is NO
-connections=101 # Simultaneous connections (installation default)
+connections=99 # Simultaneous connections (installation default)
constraint_check=syntax only # Column constraints
###< create table crash_q (a int check (a>0))
###> OK
@@ -213,7 +213,7 @@ constraint_null=yes # NULL constraint (SyBase style)
###
###As far as all queries returned OK, result is YES
crash_me_safe=yes # crash me safe
-crash_me_version=1.60 # crash me version
+crash_me_version=1.61 # crash me version
create_default=yes # default value for column
###< create table crash_q (q integer default 10 not null)
###> OK
@@ -345,7 +345,7 @@ date_format_inresult=iso # Date format in result
###> OK
###
###< select a from crash_me_d
- ###> 2003-02-08
+ ###> 2003-03-26
###< delete from crash_me_d
###> OK
date_infinity=error # Supports 'infinity dates
@@ -695,7 +695,7 @@ func_extra_elt=yes # Function ELT
func_extra_encrypt=yes # Function ENCRYPT
###
###<select encrypt('hello')
- ###>kpb.ynRIu0Udw
+ ###>tJNum3fO44bOE
func_extra_expand2arg=no # Function EXPAND
###
###<select expand('abcd',6)
@@ -991,7 +991,7 @@ func_extra_subtime=no # Function SUBTIME
func_extra_sysdate=yes # Function SYSDATE
###
###<select sysdate()
- ###>2003-02-08 00:09:52
+ ###>2003-03-26 13:44:57
func_extra_tail=no # Function TAIL
###
###<select tail('ABCDEFG',3)
@@ -1056,7 +1056,7 @@ func_extra_uid=no # Function UID
func_extra_unix_timestamp=yes # Function UNIX_TIMESTAMP
###
###<select unix_timestamp()
- ###>1044655792
+ ###>1048679097
func_extra_userenv=no # Function USERENV
###
###<select userenv
@@ -1068,7 +1068,7 @@ func_extra_value=no # Function VALUE
func_extra_version=yes # Function VERSION
###
###<select version()
- ###>4.0.11-gamma
+ ###>4.0.12-debug
func_extra_weekday=yes # Function WEEKDAY
###
###<select weekday('1997-11-29') from crash_me_d
@@ -1136,11 +1136,11 @@ func_odbc_cot=yes # Function COT
func_odbc_curdate=yes # Function CURDATE
###
###<select curdate()
- ###>2003-02-08
+ ###>2003-03-26
func_odbc_curtime=yes # Function CURTIME
###
###<select curtime()
- ###>00:09:52
+ ###>13:44:57
func_odbc_database=yes # Function DATABASE
###
###<select database()
@@ -1269,7 +1269,7 @@ func_odbc_monthname=yes # Function MONTHNAME
func_odbc_now=yes # Function NOW
###
###<select now()
- ###>2003-02-08 00:09:52
+ ###>2003-03-26 13:44:57
func_odbc_pi=yes # Function PI
###
###<select pi()
@@ -1416,15 +1416,15 @@ func_sql_concat_as_||=error # Function concatenation with ||
func_sql_current_date=yes # Function CURRENT_DATE
###
###<select current_date
- ###>2003-02-08
+ ###>2003-03-26
func_sql_current_time=yes # Function CURRENT_TIME
###
###<select current_time
- ###>00:09:52
+ ###>13:44:57
func_sql_current_timestamp=yes # Function CURRENT_TIMESTAMP
###
###<select current_timestamp
- ###>2003-02-08 00:09:52
+ ###>2003-03-26 13:44:57
func_sql_current_user=with_parenthesis # CURRENT_USER
###< select CURRENT_USER
###> execute error:Unknown column 'CURRENT_USER' in 'field list'
@@ -1438,11 +1438,11 @@ func_sql_extract_sql=yes # Function EXTRACT
func_sql_localtime=yes # Function LOCALTIME
###
###<select localtime
- ###>2003-02-08 00:09:52
+ ###>2003-03-26 13:44:57
func_sql_localtimestamp=yes # Function LOCALTIMESTAMP
###
###<select localtimestamp
- ###>2003-02-08 00:09:52
+ ###>2003-03-26 13:44:57
func_sql_lower=yes # Function LOWER
###
###<select LOWER('ABC')
@@ -1880,7 +1880,7 @@ logical_value=1 # Value of logical operation (1=1)
###>1
max_big_expressions=10 # big expressions
###We are trying (example with N=5):
- ###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(10558)
+ ###select 0+(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+...(16398)
### 50:FAIL 10:OK 30:FAIL 14:FAIL 11:FAIL
max_char_size=255 # max char() size
###We are trying (example with N=5):
@@ -1902,10 +1902,10 @@ max_conditions=85660 # OR and AND in WHERE
###We are trying (example with N=5):
###select a from crash_me where a=1 and b='a' or a=0 and b='0' or a=1 and b='1' or a=2 and b='2' or a=3 and b='3' or a=4 and b='4'
### 27592:OK 41389:OK 48287:FAIL 42769:OK 45528:FAIL 43321:FAIL 42880:FAIL 42791:OK 42835:FAIL 42800:OK 42817:OK 42826:OK 42830:OK 42832:FAIL 42831:FAIL
-max_expressions=1075 # simple expressions
+max_expressions=1659 # simple expressions
###We are trying (example with N=5):
###select 1+1+1+1+1+1
- ### 5000:FAIL 1000:OK 3000:FAIL 1400:FAIL 1080:FAIL 1016:OK 1048:OK 1064:OK 1072:OK 1076:FAIL 1073:OK 1074:OK 1075:OK
+ ### 5000:FAIL 1000:OK 3000:FAIL 1400:OK 2200:FAIL 1560:OK 1880:FAIL 1624:OK 1752:FAIL 1650:OK 1701:FAIL 1660:FAIL 1652:OK 1656:OK 1658:OK 1659:OK
max_index=32 # max index
### max_unique_index=32 ,so max_index must be same
max_index_length=500 # index length
@@ -1946,10 +1946,10 @@ max_row_length_with_null=65502 # table row length with nulls (without blobs)
max_select_alias_name=+512 # select alias name length
###We are trying (example with N=5):
###select b as aaaaa from crash_me
-max_stack_expression=1075 # stacked expressions
+max_stack_expression=1659 # stacked expressions
###We are trying (example with N=5):
###select 1+(1+(1+(1+(1+(1)))))
- ### 1000:OK 1500:FAIL 1100:FAIL 1020:OK 1060:OK 1080:FAIL 1064:OK 1072:OK 1076:FAIL 1073:OK 1074:OK 1075:OK
+ ### 1000:OK 1500:OK 1750:FAIL 1550:OK 1650:OK 1700:FAIL 1660:FAIL 1652:OK 1656:OK 1658:OK 1659:OK
max_table_alias_name=+512 # table alias name length
###We are trying (example with N=5):
###select aaaaa.b from crash_me aaaaa
@@ -6043,7 +6043,7 @@ select_without_from=yes # SELECT without FROM
###> OK
###
###As far as all queries returned OK, result is YES
-server_version=MySQL 4.0.11 gamma # server version
+server_version=MySQL 4.0.12 debug/ # server version
simple_joins=yes # ANSI SQL simple joins
###< select crash_me.a from crash_me, crash_me t0
###> OK
@@ -6166,7 +6166,7 @@ time_format_inresult=iso # Time format in result
###> OK
###
###< select a from crash_me_t
- ###> 00:09:52
+ ###> 13:44:57
###< delete from crash_me_t
###> OK
transactions=yes # transactions
diff --git a/sql/item.cc b/sql/item.cc
index b4d2d0670d8..7a8f988439d 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1268,6 +1268,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
maybe_null= (*ref)->maybe_null;
decimals= (*ref)->decimals;
set_charset((*ref)->charset());
+ with_sum_func= (*ref)->with_sum_func;
fixed= 1;
if (ref && (*ref)->check_cols(1))
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 2a0194aba28..4b61f1013c1 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1451,19 +1451,25 @@ String *Item_func_database::val_str(String *str)
return str;
}
+// TODO: make USER() replicate properly (currently it is replicated to "")
+
String *Item_func_user::val_str(String *str)
{
THD *thd=current_thd;
CHARSET_INFO *cs= default_charset();
const char *host=thd->host ? thd->host : thd->ip ? thd->ip : "";
- uint32 res_length=(strlen(thd->user)+strlen(host)+10) * cs->mbmaxlen;
+ // For system threads (e.g. replication SQL thread) user may be empty
+ if (!thd->user)
+ return &empty_string;
+ uint32 res_length=(strlen(thd->user)+strlen(host)+2) * cs->mbmaxlen;
if (str->alloc(res_length))
{
- null_value=1;
- return 0;
+ null_value=1;
+ return 0;
}
- res_length=cs->snprintf(cs, (char*)str->ptr(), res_length, "%s@%s",thd->user,host);
+ res_length=cs->snprintf(cs, (char*)str->ptr(), res_length, "%s@%s",
+ thd->user, host);
str->length(res_length);
str->set_charset(cs);
return str;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ac3703c5a1d..5324f61b2b8 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2043,12 +2043,14 @@ static int init_common_variables(const char *conf_file_name, int argc,
#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
{
/* Retrieve used stack size; Needed for checking stack overflows */
- size_t stack_size;
+ size_t stack_size= 0;
pthread_attr_getstacksize(&connection_attrib, &stack_size);
- if (global_system_variables.log_warnings && stack_size != thread_stack)
+ /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */
+ if (stack_size && stack_size != thread_stack)
{
- sql_print_error("Warning: Asked for %ld thread stack, but got %ld",
- thread_stack, stack_size);
+ if (global_system_variables.log_warnings)
+ sql_print_error("Warning: Asked for %ld thread stack, but got %ld",
+ thread_stack, stack_size);
thread_stack= stack_size;
}
}
diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt
index 6d34b5a93b3..efdd261ff59 100644
--- a/sql/share/swedish/errmsg.txt
+++ b/sql/share/swedish/errmsg.txt
@@ -5,22 +5,22 @@
"isamchk",
"NO",
"YES",
-"Kan inte skapa filen: '%-.64s' (Felkod: %d)",
-"Kan inte skapa tabellen: '%-.64s' (Felkod: %d)",
+"Kan inte skapa filen '%-.64s' (Felkod: %d)",
+"Kan inte skapa tabellen '%-.64s' (Felkod: %d)",
"Kan inte skapa databasen '%-.64s'. (Felkod: %d)",
"Databasen '%-.64s' existerar redan",
"Kan inte radera databasen '%-.64s'. Databasen finns inte",
"Fel vid radering av databasen (Kan inte radera '%-.64s'. Felkod: %d)",
"Fel vid radering av databasen (Kan inte radera biblioteket '%-.64s'. Felkod: %d)",
-"Kan inte radera filen: '%-.64s' (Felkod: %d)",
+"Kan inte radera filen '%-.64s' (Felkod: %d)",
"Hittar inte posten i systemregistret",
"Kan inte läsa filinformationen (stat) från '%-.64s' (Felkod: %d)",
"Kan inte inte läsa aktivt bibliotek. (Felkod: %d)",
"Kan inte låsa filen. (Felkod: %d)",
-"Kan inte använda: '%-.64s'. (Felkod: %d)",
-"Hittar inte filen: '%-.64s'. (Felkod: %d)",
+"Kan inte använda '%-.64s'. (Felkod: %d)",
+"Hittar inte filen '%-.64s'. (Felkod: %d)",
"Kan inte läsa från bibliotek '%-.64s'. (Felkod: %d)",
-"Kan inte byta till: '%-.64s'. (Felkod: %d)",
+"Kan inte byta till '%-.64s'. (Felkod: %d)",
"Posten har förändrats sedan den lästes i register '%-.64s'",
"Disken är full (%s). Väntar tills det finns ledigt utrymme....",
"Kan inte skriva, dubbel söknyckel i register '%-.64s'",
@@ -36,13 +36,13 @@
"Hittar inte posten",
"Felaktig fil: '%-.64s'",
"Fatalt fel vid hantering av register '%-.64s'. Kör en reparation",
-"Gammal nyckelfil '%-.64s'; Reparera registret",
+"Gammal nyckelfil '%-.64s'. Reparera registret",
"'%-.64s' är skyddad mot förändring",
"Oväntat slut på minnet, starta om programmet och försök på nytt (Behövde %d bytes)",
"Sorteringsbufferten räcker inte till. Kontrollera startparametrarna",
"Oväntat filslut vid läsning från '%-.64s' (Felkod: %d)",
"För många anslutningar",
-"Fick slut på minnet. Kontrollera ifall mysqld eller någon annan process använder allt tillgängligt minne. Ifall inte, försök använda 'ulimit' eller allokera mera swap",
+"Fick slut på minnet. Kontrollera om mysqld eller någon annan process använder allt tillgängligt minne. Om inte, försök använda 'ulimit' eller allokera mera swap",
"Kan inte hitta 'hostname' för din adress",
"Fel vid initiering av kommunikationen med klienten",
"Användare '%-.32s@%-.64s' är ej berättigad att använda databasen %-.64s",
@@ -50,43 +50,43 @@
"Ingen databas i användning",
"Okänt commando",
"Kolumn '%-.64s' får inte vara NULL",
-"Okänd database '%-.64s'",
+"Okänd databas: '%-.64s'",
"Tabellen '%-.64s' finns redan",
"Okänd tabell '%-.64s'",
-"Kolumn: '%-.64s' i %s är inte unik",
+"Kolumn '%-.64s' i %s är inte unik",
"Servern går nu ned",
"Okänd kolumn '%-.64s' i %s",
"'%-.64s' finns inte i GROUP BY",
"Kan inte använda GROUP BY med '%-.64s'",
"Kommandot har både sum functions och enkla funktioner",
"Antalet kolumner motsvarar inte antalet värden",
-"Kolumn namn '%-.64s' är för långt",
-"Kolumn namn '%-.64s finns flera gånger",
-"Nyckel namn '%-.64s' finns flera gånger",
-"Dubbel nyckel '%-.64s' för nyckel: %d",
-"Felaktigt kolumn typ för kolumn: '%-.64s'",
+"Kolumnnamn '%-.64s' är för långt",
+"Kolumnnamn '%-.64s finns flera gånger",
+"Nyckelnamn '%-.64s' finns flera gånger",
+"Dubbel nyckel '%-.64s' för nyckel %d",
+"Felaktigt kolumntyp för kolumn '%-.64s'",
"%s nära '%-.64s' på rad %d",
"Frågan var tom",
"Icke unikt tabell/alias: '%-.64s'",
"Ogiltigt DEFAULT värde för '%-.64s'",
"Flera PRIMARY KEY använda",
"För många nycklar använda. Man får ha högst %d nycklar",
-"För många nyckel delar använda. Man får ha högst %d nyckeldelar",
+"För många nyckeldelar använda. Man får ha högst %d nyckeldelar",
"För lång nyckel. Högsta tillåtna nyckellängd är %d",
-"Nyckel kolumn '%-.64s' finns inte",
-"En BLOB '%-.64s' kan inte vara nyckel med den använda tabellen typen",
+"Nyckelkolumn '%-.64s' finns inte",
+"En BLOB '%-.64s' kan inte vara nyckel med den använda tabelltypen",
"För stor kolumnlängd angiven för '%-.64s' (max= %d). Använd en BLOB instället",
-"Det får finnas endast ett AUTO_INCREMENT fält och detta måste vara en nyckel",
+"Det får finnas endast ett AUTO_INCREMENT-fält och detta måste vara en nyckel",
"%s: klar att ta emot klienter\n",
"%s: Normal avslutning\n",
"%s: Fick signal %d. Avslutar!\n",
"%s: Avslutning klar\n",
-"%s: Stänger av tråd %ld användare: '%-.64s'\n",
-"Kan inte skapa IP socket",
+"%s: Stänger av tråd %ld; användare: '%-.64s'\n",
+"Kan inte skapa IP-socket",
"Tabellen '%-.64s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen",
-"Fält separatorerna är inte emotsägande eller för långa. Kontrollera mot manualen",
+"Fältseparatorerna är vad som förväntades. Kontrollera mot manualen",
"Man kan inte använda fast radlängd med blobs. Använd 'fields terminated by'",
-"Textfilen '%' måste finnas i databas biblioteket eller vara läsbar för alla",
+"Textfilen '%' måste finnas i databasbiblioteket eller vara läsbar för alla",
"Filen '%-.64s' existerar redan",
"Rader: %ld Bortagna: %ld Dubletter: %ld Varningar: %ld",
"Rader: %ld Dubletter: %ld",
@@ -94,18 +94,18 @@
"Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället",
"Kan inte ta bort '%-.64s'. Kontrollera att fältet/nyckel finns",
"Rader: %ld Dubletter: %ld Varningar: %ld",
-"You can't specify target table '%-.64s' for update in FROM clause",
-"Finns inget thread med id %lu",
-"Du är inte ägare till thread %lu",
+"INSERT-table '%-.64s' får inte finnas i FROM tabell-listan",
+"Finns ingen tråd med id %lu",
+"Du är inte ägare till tråd %lu",
"Inga tabeller angivna",
"För många alternativ till kolumn %s för SET",
"Kan inte generera ett unikt filnamn %s.(1-999)\n",
"Tabell '%-.64s' kan inte uppdateras emedan den är låst för läsning",
"Tabell '%-.64s' är inte låst med LOCK TABLES",
-"BLOB fält '%-.64s' kan inte ha ett DEFAULT värde",
-"Felaktigt databas namn '%-.64s'",
-"Felaktigt tabell namn '%-.64s'",
-"Den angivna frågan skulle troligen ta mycket long tid! Kontrollar din WHERE och använd SET OPTION SQL_BIG_SELECTS=1 ifall du vill hantera stora joins",
+"BLOB fält '%-.64s' kan inte ha ett DEFAULT-värde",
+"Felaktigt databasnamn '%-.64s'",
+"Felaktigt tabellnamn '%-.64s'",
+"Den angivna frågan skulle troligen ta mycket lång tid! Kontrollera din WHERE och använd SET OPTION SQL_BIG_SELECTS=1 ifall du vill hantera stora joins",
"Oidentifierat fel",
"Okänd procedur: %s",
"Felaktigt antal parametrar till procedur %s",
@@ -116,12 +116,12 @@
"Tabell '%-.64s' har en extension som inte finns i denna version av MySQL",
"Tabeller måste ha minst 1 kolumn",
"Tabellen '%-.64s' är full",
-"Okänt karaktärset: '%-.64s'",
+"Okänd teckenuppsättning: '%-.64s'",
"För många tabeller. MySQL can ha högst %d tabeller i en och samma join",
"För många fält",
-"För stor total rad längd. Den högst tillåtna rad-längden, förutom BLOBs, är %d. Ändra några av dina fält till BLOB",
-"Tråd-stacken tog slut: Har använt %ld av %ld bytes. Använd 'mysqld -O thread_stack=#' ifall du behöver en större stack",
-"Felaktigt referens i OUTER JOIN. Kontrollera ON uttrycket",
+"För stor total radlängd. Den högst tillåtna radlängden, förutom BLOBs, är %d. Ändra några av dina fält till BLOB",
+"Trådstacken tog slut: Har använt %ld av %ld bytes. Använd 'mysqld -O thread_stack=#' ifall du behöver en större stack",
+"Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket",
"Kolumn '%-.32s' är använd med UNIQUE eller INDEX men är inte definerad med NOT NULL",
"Kan inte ladda funktionen '%-.64s'",
"Kan inte initialisera funktionen '%-.64s'; '%-.80s'",
@@ -130,30 +130,30 @@
"Kan inte öppna det dynamiska biblioteket '%-.64s' (Felkod: %d %s)",
"Hittar inte funktionen '%-.64s' in det dynamiska biblioteket",
"Funktionen '%-.64s' är inte definierad",
-"Denna dator '%-.64s' är blockerad pga många felaktig paket. Gör 'mysqladmin flush-hosts' för att ta bort alla blockeringarna",
-"Denna dator '%-.64s' har inte privileger att använda denna MySQL server",
+"Denna dator, '%-.64s', är blockerad pga många felaktig paket. Gör 'mysqladmin flush-hosts' för att ta bort alla blockeringarna",
+"Denna dator, '%-.64s', har inte privileger att använda denna MySQL server",
"Du använder MySQL som en anonym användare och som sådan får du inte ändra ditt lösenord",
-"För att ändra lösenord för andra måste du ha rättigheter att uppdatera mysql databasen",
-"Hittade inte användaren i 'user' tabellen",
+"För att ändra lösenord för andra måste du ha rättigheter att uppdatera mysql-databasen",
+"Hittade inte användaren i 'user'-tabellen",
"Rader: %ld Uppdaterade: %ld Varningar: %ld",
"Kan inte skapa en ny tråd (errno %d)",
"Antalet kolumner motsvarar inte antalet värden på rad: %ld",
-"Kunde inte stänga och öppna tabell: '%-.64s",
+"Kunde inte stänga och öppna tabell '%-.64s",
"Felaktig använding av NULL",
-"Fix fel '%-.64s' från REGEXP",
-"Man får ha både GROUP kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY del",
+"Fick fel '%-.64s' från REGEXP",
+"Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del",
"Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s'",
"%-.16s ej tillåtet för '%-.32s@%-.64s' för tabell '%-.64s'",
-"%-.16s ej tillåtet för '%-.32s@%-.64s'\n för kolumn '%-.64s' i tabell '%-.64s'",
-"Felaktigt GRANT privilegium använt",
+"%-.16s ej tillåtet för '%-.32s@%-.64s' för kolumn '%-.64s' i tabell '%-.64s'",
+"Felaktigt GRANT-privilegium använt",
"Felaktigt maskinnamn eller användarnamn använt med GRANT",
"Det finns ingen tabell som heter '%-.64s.%s'",
"Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s' för tabell '%-.64s'",
"Du kan inte använda detta kommando med denna MySQL version",
"Du har något fel i din syntax",
-"DELAYED INSERT tråden kunde inte låsa tabell '%-.64s'",
+"DELAYED INSERT-tråden kunde inte låsa tabell '%-.64s'",
"Det finns redan 'max_delayed_threads' trådar i använding",
-"Avbröt länken för tråd %ld till db: '%-.64s' användare: '%-.64s' (%s)",
+"Avbröt länken för tråd %ld till db '%-.64s', användare '%-.64s' (%s)",
"Kommunkationspaketet är större än 'max_allowed_packet'",
"Fick läsfel från klienten vid läsning från 'PIPE'",
"Fick fatalt fel från 'fcntl()'",
@@ -163,20 +163,20 @@
"Fick 'timeout' vid läsning från klienten",
"Fick ett fel vid skrivning till klienten",
"Fick 'timeout' vid skrivning till klienten",
-"Resultat strängen är längre än max_allowed_packet",
-"Den använda tabell typen kan inte hantera BLOB/TEXT kolumner",
-"Den använda tabell typen kan inte hantera AUTO_INCREMENT kolumner",
+"Resultatsträngen är längre än max_allowed_packet",
+"Den använda tabelltypen kan inte hantera BLOB/TEXT-kolumner",
+"Den använda tabelltypen kan inte hantera AUTO_INCREMENT-kolumner",
"INSERT DELAYED kan inte användas med tabell '%-.64s', emedan den är låst med LOCK TABLES",
-"Felaktigt column namn '%-.100s'",
-"Den använda tabell typen kan inte indexera kolumn '%-.64s'",
-"Tabellerna i MERGE tabellen är inte identiskt definierade",
-"Kan inte skriva till tabell '%-.64s'; UNIQUE test",
-"Du har inte angett en nyckel längd för BLOB '%-.64s'",
+"Felaktigt kolumnnamn '%-.100s'",
+"Den använda tabelltypen kan inte indexera kolumn '%-.64s'",
+"Tabellerna i MERGE-tabellen är inte identiskt definierade",
+"Kan inte skriva till tabell '%-.64s'; UNIQUE-test",
+"Du har inte angett någon nyckellängd för BLOB '%-.64s'",
"Alla delar av en PRIMARY KEY måste vara NOT NULL; Om du vill ha en nyckel med NULL, använd UNIQUE istället",
"Resultet bestod av mera än en rad",
-"Denna tabell typ kräver en PRIMARY KEY",
+"Denna tabelltyp kräver en PRIMARY KEY",
"Denna version av MySQL är inte kompilerad med RAID",
-"Du använder 'säker uppdaterings mod' och försökte uppdatera en table utan en WHERE sats som använder sig av en nyckel",
+"Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel",
"Nyckel '%-.64s' finns inte in tabell '%-.64s'",
"Kan inte öppna tabellen",
"Tabellhanteraren för denna tabell kan inte göra %s",
@@ -185,59 +185,59 @@
"Fick fel %d vid ROLLBACK",
"Fick fel %d vid FLUSH_LOGS",
"Fick fel %d vid CHECKPOINT",
-"Avbröt länken för tråd %ld till db: '%-.64s' användare: '%-.32s' Host: '%-.64s' (%.-64s)",
+"Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s', host '%-.64s' (%.-64s)",
"Tabellhanteraren klarar inte en binär kopiering av tabellen",
-"Binärloggen stängdes medan vi gjorde FLUSH MASTER",
+"Binärloggen stängdes medan FLUSH MASTER utfördes",
"Failed rebuilding the index of dumped table '%-.64s'",
"Fick en master: '%-.64s'",
"Fick nätverksfel vid läsning från master",
"Fick nätverksfel vid skrivning till master",
-"Hittar inte ett FULLTEXT index i kolumnlistan",
-"Kan inte exekvera kommandot emedan du har en låst tabell eller an aktiv transaktion",
-"Okänd system variabel '%-.64s'",
-"Tabell '%-.64s' är crashad och bör repareras med REPAIR TABLE",
-"Tabell '%-.64s' är crashad och senast (automatiska?) reparation misslyckades",
-"Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK",
-"Transaktionen krävde mera än 'max_binlog_cache_size' minne. Utöka denna mysqld variabel och försök på nytt",
+"Hittar inte ett FULLTEXT-index i kolumnlistan",
+"Kan inte utföra kommandot emedan du har en låst tabell eller an aktiv transaktion",
+"Okänd systemvariabel: '%-.64s'",
+"Tabell '%-.64s' är trasig och bör repareras med REPAIR TABLE",
+"Tabell '%-.64s' är trasig och senast (automatiska?) reparation misslyckades",
+"Warning: Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK",
+"Transaktionen krävde mera än 'max_binlog_cache_size' minne. Öka denna mysqld-variabel och försök på nytt",
"Denna operation kan inte göras under replikering; Gör STOP SLAVE först",
"Denna operation kan endast göras under replikering; Konfigurera slaven och gör START SLAVE",
-"Servern är inte konfigurerade som en replikations slav. Ändra konfigurationsfilen eller gör CHANGE MASTER TO",
-"Kunde inte initializera replications-strukturerna. Kontrollera privilegerna för 'master.info'",
+"Servern är inte konfigurerade som en replikationsslav. Ändra konfigurationsfilen eller gör CHANGE MASTER TO",
+"Kunde inte initialisera replikationsstrukturerna. Kontrollera privilegerna för 'master.info'",
"Kunde inte starta en tråd för replikering",
"Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar",
-"Man kan endast använda konstant-uttryck med SET",
+"Man kan endast använda konstantuttryck med SET",
"Fick inte ett lås i tid ; Försök att starta om transaktionen",
"Antal lås överskrider antalet reserverade lås",
-"Updaterings-lås kan inte göras när man använder READ UNCOMMITTED",
-"DROP DATABASE är inte tillåtet när man har ett globalt läs-lås",
-"CREATE DATABASE är inte tillåtet när man har ett globalt läs-lås",
+"Updateringslås kan inte göras när man använder READ UNCOMMITTED",
+"DROP DATABASE är inte tillåtet när man har ett globalt läslås",
+"CREATE DATABASE är inte tillåtet när man har ett globalt läslås",
"Felaktiga argument till %s",
"%-.32s@%-.64s har inte rättighet att skapa nya användare",
-"Felaktig tabell definition: Alla tabeller i en MERGE tabell måste vara i samma databas",
-"Fick 'DEADLOCK' vid låsförsök av block/rad; Försök att starta om transaktionen",
-"Tabelltypen har inte hantering av FULLTEXT index",
+"Felaktig tabelldefinition. Alla tabeller i en MERGE-tabell måste vara i samma databas",
+"Fick 'DEADLOCK' vid låsförsök av block/rad. Försök att starta om transaktionen",
+"Tabelltypen har inte hantering av FULLTEXT-index",
"Kan inte lägga till 'FOREIGN KEY constraint'",
-"FOREIGN KEY konflikt: Kan inte skriva barn",
-"FOREIGN KEY konflikt: Kan inte radera fader",
+"FOREIGN KEY-konflikt: Kan inte skriva barn",
+"FOREIGN KEY-konflikt: Kan inte radera fader",
"Fick fel vid anslutning till master: %-.128s",
"Fick fel vid utförande av command på mastern: %-.128s",
"Fick fel vid utförande av %s: %-.128s",
"Felaktig använding av %s and %s",
-"SELECT kommandona har olika antal kolumner"
-"Kan inte utföra kommandot emedan du har ett READ lås",
+"SELECT-kommandona har olika antal kolumner"
+"Kan inte utföra kommandot emedan du har ett READ-lås",
"Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat",
"Option '%s' användes två gånger",
"Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)",
"Du har inte privlegiet '%-.128s' som behövs för denna operation",
-"Variable '%-.64s' är en LOCAL variabel och kan inte ändrad med SET GLOBAL",
-"Variable '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL",
-"Variable '%-.64s' har inte ett DEFAULT värde",
-"Variable '%-.64s' kan inte be satt till '%-.64s'",
+"Variabel '%-.64s' är en LOCAL variabel och kan inte ändrad med SET GLOBAL",
+"Variabel '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL",
+"Variabel '%-.64s' har inte ett DEFAULT-värde",
+"Variabel '%-.64s' kan inte sättas till '%-.64s'",
"Fel typ av argument till variabel '%-.64s'",
"Variabeln '%-.64s' kan endast sättas, inte läsas",
"Fel använding/placering av '%s'",
-"Denna version av MySQL kan inte utföra '%s'",
-"Fick fatalt fel %d: '%-.128s' från master vid läsning av binär loggen",
+"Denna version av MySQL kan ännu inte utföra '%s'",
+"Fick fatalt fel %d: '%-.128s' från master vid läsning av binärloggen"
"Felaktig FOREIGN KEY-definition för '%-.64s': %s",
"Nyckelreferensen och tabellreferensen stämmer inte överens",
"Kardinalitetsfel (fler/färre än %d kolumner)",
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d08e6b70634..318e67252c7 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3419,21 +3419,29 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
lex->col_list.empty();
}
- if (default_value && default_value->type() == Item::NULL_ITEM)
+ if (default_value)
{
- if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) ==
- NOT_NULL_FLAG)
+ if (default_value->type() == Item::NULL_ITEM)
{
- net_printf(thd,ER_INVALID_DEFAULT,field_name);
+ default_value=0;
+ if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) ==
+ NOT_NULL_FLAG)
+ {
+ net_printf(thd,ER_INVALID_DEFAULT,field_name);
+ DBUG_RETURN(1);
+ }
+ }
+ else if (type_modifier & AUTO_INCREMENT_FLAG)
+ {
+ net_printf(&thd, ER_INVALID_DEFAULT, field_name);
DBUG_RETURN(1);
}
- default_value=0;
}
if (!(new_field=new create_field()))
DBUG_RETURN(1);
new_field->field=0;
new_field->field_name=field_name;
- new_field->def= (type_modifier & AUTO_INCREMENT_FLAG ? 0 : default_value);
+ new_field->def= default_value;
new_field->flags= type_modifier;
new_field->unireg_check= (type_modifier & AUTO_INCREMENT_FLAG ?
Field::NEXT_NUMBER : Field::NONE);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 84c68d37c91..c57fc10543a 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -3081,6 +3081,7 @@ into:
LEX *lex=Lex;
if (!lex->describe)
{
+ lex->uncacheable()
if (!(lex->exchange= new sql_exchange($3.str,0)))
YYABORT;
if (!(lex->result= new select_export(lex->exchange)))
@@ -3093,6 +3094,7 @@ into:
LEX *lex=Lex;
if (!lex->describe)
{
+ lex->uncacheable()
if (!(lex->exchange= new sql_exchange($3.str,1)))
YYABORT;
if (!(lex->result= new select_dump(lex->exchange)))
diff --git a/support-files/MacOSX/ReadMe.txt b/support-files/MacOSX/ReadMe.txt
index ed2d2b4c714..a18c5f3aa41 100644
--- a/support-files/MacOSX/ReadMe.txt
+++ b/support-files/MacOSX/ReadMe.txt
@@ -46,8 +46,8 @@ the following commands in a terminal window:
sudo ./bin/mysqld_safe
(Enter your password)
(Press CTRL+Z)
- (Press CTRL+D to exit the shell)
bg
+ (Press CTRL+D to exit the shell)
You should now be able to connect to the MySQL server,
e.g. by running /usr/local/mysql/bin/mysql