Commit 21b5aecf authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into narttu.mysql.fi:/my/mysql-4.0

parents d4ae4f0e 517bbace
......@@ -19,7 +19,7 @@
man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \
mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \
perror.1 replace.1 mysqld_safe.1
perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1
EXTRA_DIST = $(man_MANS)
......
.TH isamchk 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH isamchk 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
.BR isamchk
\- Description, check and repair of ISAM tables.
......
.TH isamlog 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH isamlog 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
isamlog - Write info about whats in a nisam log file.
.SH USAGE
......
.TH mysql 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysql 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
mysql \- text-based client for mysqld, a SQL-based relational database daemon
.SH SYNOPSIS
......
.TH mysql 1 "17 March 2003" "MySQL 4.0" "MySQL database"
.SH NAME
mysql_fix_privilege_tables \- Fixes MySQL privilege tables.
.SH SYNOPSIS
mysql_fix_privilege_tables [options]
.SH DESCRIPTION
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.
This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23
If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
For more information start the program with '--help'.
.SH "SEE ALSO"
mysql (1), mysqld (1)
.SH AUTHOR
This manpage was written by Christian Hammers <ch@debian.org>.
MySQL is available at http://www.mysql.com/.
.\" end of man page
.TH zap 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH zap 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
zap - a perl script used to kill processes
.SH USAGE
......
.TH mysqlaccess 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqlaccess 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
.BR mysqlaccess
\- Create new users to mysql.
......
.TH mysqladmin 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqladmin 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
mysqladmin [OPTIONS] command command.... \- A utility for performing administrative operations
.SH OPTION SYNOPSIS
......
.TH mysqld 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqld 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
.BR mysqld
\- Starts the MySQL server demon
......
.TH mysqld_multi 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqld_multi 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
mysqld_multi - is meant for managing several mysqld processes running in different UNIX sockets and TCP/IP ports.
.SH USAGE
......
.TH safe_mysqld 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH safe_mysqld 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
mysqld_safe \- start the mysqld daemon on Unix.
.SH SYNOPSIS
......
.TH mysqldump 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqldump 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
mysqldump \- text-based client for dumping or backing up mysql databases , tables and or data.
......
.TH mysqlshow 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH mysqlshow 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
.BR mysqlshow
\- Shows the structure of a mysql database (databases,tables and columns)
......
.TH perror 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH perror 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
perror \- describes a system or MySQL error code.
.SH SYNOPSIS
......
.TH replace 1 "19 December 2000" "MySQL 3.23" "MySQL database"
.TH replace 1 "19 December 2000" "MySQL 4.0" "MySQL database"
.SH NAME
.TP
replace - A utility program that is used by msql2mysql, but that has more general applicability as well. replace changes strings in place in files or on the standard input. Uses a finite state machine to match longer strings first. Can be used to swap strings.
......
......@@ -25,13 +25,9 @@ create table t1 (a int not null auto_increment,primary key (a)) type=heap;
The used table type doesn't support AUTO_INCREMENT columns
create table t1 (a int not null,b text) type=heap;
The used table type doesn't support BLOB/TEXT columns
create table t1 (a int ,primary key(a)) type=heap;
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
drop table if exists t1;
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
The used table type doesn't support AUTO_INCREMENT columns
create table t1 (ordid int(8), primary key (ordid));
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
create table not_existing_database.test (a int);
Got one of the listed errors
create table `a/a` (a int);
......@@ -171,3 +167,12 @@ t1 CREATE TABLE `t1` (
) TYPE=MyISAM
SET SESSION table_type=default;
drop table t1;
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
insert into t1 values ("c", NULL);
Column 'k2' cannot be null
insert into t1 values (NULL, 3);
Column 'k1' cannot be null
insert into t1 values (NULL, NULL);
Column 'k1' cannot be null
drop table t1;
......@@ -138,15 +138,6 @@ id parent_id level
1008 102 2
1010 102 2
1015 102 2
explain select level from t1 where level=1;
table type possible_keys key key_len ref rows Extra
t1 ref level level 1 const 12 Using where; Using index
explain select level,id from t1 where level=1;
table type possible_keys key key_len ref rows Extra
t1 ref level level 1 const 12 Using where; Using index
explain select level,id,parent_id from t1 where level=1;
table type possible_keys key key_len ref rows Extra
t1 ref level level 1 const 12 Using where
select level,id from t1 where level=1;
level id
1 1002
......@@ -595,9 +586,6 @@ id parent_id level
1009 102 2
1025 102 2
1016 102 2
explain select level from t1 where level=1;
table type possible_keys key key_len ref rows Extra
t1 ref level level 1 const 6 Using where; Using index
select level,id from t1 where level=1;
level id
1 1004
......
......@@ -42,7 +42,6 @@ price area type transityes shopsyes schoolsyes petsyes
drop table t1;
CREATE TABLE t1 (program enum('signup','unique','sliding') not null, type enum('basic','sliding','signup'), sites set('mt'), PRIMARY KEY (program));
ALTER TABLE t1 modify program enum('signup','unique','sliding');
All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead
drop table t1;
CREATE TABLE t1 (
name varchar(50) DEFAULT '' NOT NULL,
......
......@@ -24,11 +24,9 @@ drop table if exists t1,t2;
!$1167 create table t1 (b char(0) not null, index(b));
!$1164 create table t1 (a int not null auto_increment,primary key (a)) type=heap;
!$1163 create table t1 (a int not null,b text) type=heap;
!$1171 create table t1 (a int ,primary key(a)) type=heap;
drop table if exists t1;
!$1164 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) type=heap;
!$1171 create table t1 (ordid int(8), primary key (ordid));
-- error 1044,1
create table not_existing_database.test (a int);
......@@ -119,3 +117,13 @@ show create table t1;
SET SESSION table_type=default;
drop table t1;
#
# ISO requires that primary keys are implicitly NOT NULL
#
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
!$1048 insert into t1 values ("c", NULL);
!$1048 insert into t1 values (NULL, 3);
!$1048 insert into t1 values (NULL, NULL);
drop table t1;
......@@ -40,9 +40,9 @@ update ignore t1 set id=id+1; # This will change all rows
select * from t1;
update ignore t1 set id=1023 where id=1010;
select * from t1 where parent_id=102;
explain select level from t1 where level=1;
explain select level,id from t1 where level=1;
explain select level,id,parent_id from t1 where level=1;
# explain select level from t1 where level=1;
# explain select level,id from t1 where level=1;
# explain select level,id,parent_id from t1 where level=1;
select level,id from t1 where level=1;
select level,id,parent_id from t1 where level=1;
optimize table t1;
......@@ -339,7 +339,7 @@ update ignore t1 set id=id+1; # This will change all rows
select * from t1;
update ignore t1 set id=1023 where id=1010;
select * from t1 where parent_id=102;
explain select level from t1 where level=1;
# explain select level from t1 where level=1;
select level,id from t1 where level=1;
select level,id,parent_id from t1 where level=1;
select level,id from t1 where level=1 order by id;
......
......@@ -54,12 +54,12 @@ INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
drop table t1;
#
# problem med primary key
# No longer a problem with primary key
#
CREATE TABLE t1 (program enum('signup','unique','sliding') not null, type enum('basic','sliding','signup'), sites set('mt'), PRIMARY KEY (program));
# The following should give an error for wrong primary key
!$1171 ALTER TABLE t1 modify program enum('signup','unique','sliding');
# This no longer give an error for wrong primary key
ALTER TABLE t1 modify program enum('signup','unique','sliding');
drop table t1;
#
......
......@@ -598,8 +598,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
{
if (key->type == Key::PRIMARY)
{
my_error(ER_PRIMARY_CANT_HAVE_NULL, MYF(0));
DBUG_RETURN(-1);
/* Implicitly set primary key fields to NOT NULL for ISO conf. */
sql_field->flags|= NOT_NULL_FLAG;
sql_field->pack_flag&= ~FIELDFLAG_MAYBE_NULL;
}
if (!(file->table_flags() & HA_NULL_KEY))
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment