Below is the list of changes that have just been committed into a local
5.0 repository of azundris. When azundris does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2107 06/05/03 02:40:00 tnurnberg@stripped +25 -0
Merge mysql.com:/home/mysql-4.1-19025
into mysql.com:/home/mysql-5.0-maint-19025
support-files/mysql.spec.sh
1.135 06/05/03 02:39:53 tnurnberg@stripped +8 -50
manually merged
sql/sql_table.cc
1.304 06/05/03 02:39:53 tnurnberg@stripped +2 -3
manually merged
sql/sql_show.cc
1.314 06/05/03 02:39:53 tnurnberg@stripped +0 -0
manually merged
sql/item_subselect.cc
1.123 06/05/03 02:39:53 tnurnberg@stripped +4 -5
manually merged
sql/item.h
1.193 06/05/03 02:39:53 tnurnberg@stripped +15 -0
manually merged
sql/item.cc
1.218 06/05/03 02:39:53 tnurnberg@stripped +8 -0
manually merged
ndb/tools/delete_all.cpp
1.18 06/05/03 02:39:53 tnurnberg@stripped +0 -1
manually merged
mysql-test/t/mysqldump.test
1.85 06/05/03 02:39:53 tnurnberg@stripped +43 -31
manually merged
mysql-test/r/symlink.result
1.22 06/05/03 02:39:53 tnurnberg@stripped +2 -4
manually merged
mysql-test/r/subselect.result
1.139 06/05/03 02:39:53 tnurnberg@stripped +0 -1
manually merged
mysql-test/r/mysqldump.result
1.93 06/05/03 02:39:52 tnurnberg@stripped +38 -38
manually merged
mysql-test/r/auto_increment.result
1.35 06/05/03 02:39:52 tnurnberg@stripped +23 -23
manually merged
configure.in
1.386 06/05/03 02:39:52 tnurnberg@stripped +0 -2
manually merged
ndb/test/ndbapi/testBlobs.cpp
1.29 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
ndb/src/ndbapi/NdbBlob.cpp
1.27 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
ndb/include/ndbapi/NdbBlob.hpp
1.17 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
ndb/include/kernel/signaldata/TcKeyReq.hpp
1.6 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
mysql-test/t/null.test
1.20 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
mysql-test/t/ndb_blob.test
1.17 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
mysql-test/t/auto_increment.test
1.25 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
mysql-test/r/null.result
1.34 06/05/03 01:15:21 tnurnberg@stripped +0 -0
Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003
1.142 06/05/03 01:15:20 tnurnberg@stripped +0 -0
Auto merged
mysql-test/r/ndb_blob.result
1.18 06/05/03 01:15:20 tnurnberg@stripped +0 -0
Auto merged
mysql-test/r/gis-rtree.result
1.15 06/05/03 01:15:20 tnurnberg@stripped +0 -0
Auto merged
include/config-win.h
1.79 06/05/03 01:15:20 tnurnberg@stripped +0 -7
Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003
1.123.19.2 06/05/03 01:15:20 tnurnberg@stripped +0 -0
Merge rename: acinclude.m4 -> BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tnurnberg
# Host: salvation.intern.azundris.com
# Root: /home/mysql-5.0-maint-19025/RESYNC
--- 1.123.19.1/acinclude.m4 2006-04-19 20:26:36 +02:00
+++ 1.142/BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003 2006-05-03 01:15:20 +02:00
@@ -1184,23 +1184,6 @@
AC_SUBST(orbit_idl)
])
-AC_DEFUN([MYSQL_CHECK_ISAM], [
- AC_ARG_WITH([isam], [
- --with-isam Enable the ISAM table type],
- [with_isam="$withval"],
- [with_isam=no])
-
- isam_libs=
- if test X"$with_isam" = X"yes"
- then
- AC_DEFINE([HAVE_ISAM], [1], [Using old ISAM tables])
- isam_libs="\$(top_builddir)/isam/libnisam.a\
- \$(top_builddir)/merge/libmerge.a"
- fi
- AC_SUBST(isam_libs)
-])
-
-
dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_BDB
dnl Sets HAVE_BERKELEY_DB if inst library is found
--- 1.313/sql/sql_show.cc 2006-03-20 11:17:41 +01:00
+++ 1.314/sql/sql_show.cc 2006-05-03 02:39:53 +02:00
@@ -1005,6 +1005,24 @@
packet->append(STRING_WITH_LEN(" ENGINE="));
packet->append(file->table_type());
+ /*
+ Add AUTO_INCREMENT=... if there is an AUTO_INCREMENT column,
+ and NEXT_ID > 1 (the default). We must not print the clause
+ for engines that do not support this as it would break the
+ import of dumps, but as of this writing, the test for whether
+ AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=...
+ is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT))
+ Because of that, we do not explicitly test for the feature,
+ but may extrapolate its existence from that of an AUTO_INCREMENT column.
+ */
+
+ if(create_info.auto_increment_value > 1)
+ {
+ packet->append(" AUTO_INCREMENT=", 16);
+ end= longlong10_to_str(create_info.auto_increment_value, buff,10);
+ packet->append(buff, (uint) (end - buff));
+ }
+
if (share->table_charset &&
!(thd->variables.sql_mode & MODE_MYSQL323) &&
!(thd->variables.sql_mode & MODE_MYSQL40))
--- 1.303/sql/sql_table.cc 2006-03-30 15:14:51 +02:00
+++ 1.304/sql/sql_table.cc 2006-05-03 02:39:53 +02:00
@@ -799,7 +799,7 @@
if (need_to_change_arena)
thd->restore_active_arena(thd->stmt_arena, &backup_arena);
- if (! sql_field->def)
+ if (sql_field->def == NULL)
{
/* Could not convert */
my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
@@ -816,9 +816,24 @@
uint not_used2;
bool not_found= 0;
String str, *def= sql_field->def->val_str(&str);
- def->length(cs->cset->lengthsp(cs, def->ptr(), def->length()));
- (void) find_set(interval, def->ptr(), def->length(),
- cs, ¬_used, ¬_used2, ¬_found);
+ if (def == NULL) /* SQL "NULL" maps to NULL */
+ {
+ if ((sql_field->flags & NOT_NULL_FLAG) != 0)
+ {
+ my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
+ DBUG_RETURN(-1);
+ }
+
+ /* else, NULL is an allowed value */
+ (void) find_set(interval, NULL, 0,
+ cs, ¬_used, ¬_used2, ¬_found);
+ }
+ else /* not NULL */
+ {
+ (void) find_set(interval, def->ptr(), def->length(),
+ cs, ¬_used, ¬_used2, ¬_found);
+ }
+
if (not_found)
{
my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
@@ -834,11 +849,24 @@
if (sql_field->def)
{
String str, *def= sql_field->def->val_str(&str);
- def->length(cs->cset->lengthsp(cs, def->ptr(), def->length()));
- if (!find_type2(interval, def->ptr(), def->length(), cs))
+ if (def == NULL) /* SQL "NULL" maps to NULL */
{
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(-1);
+ if ((sql_field->flags & NOT_NULL_FLAG) != 0)
+ {
+ my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
+ DBUG_RETURN(-1);
+ }
+
+ /* else, the defaults yield the correct length for NULLs. */
+ }
+ else /* not NULL */
+ {
+ def->length(cs->cset->lengthsp(cs, def->ptr(),
def->length()));
+ if (find_type2(interval, def->ptr(), def->length(), cs) == 0) /* not
found */
+ {
+ my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
+ DBUG_RETURN(-1);
+ }
}
}
calculate_interval_lengths(cs, interval, &field_length, &dummy);
@@ -1912,7 +1940,9 @@
}
}
delete file;
- if (error)
+ if (error == HA_ERR_WRONG_COMMAND)
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "ALTER TABLE");
+ else if (error)
my_error(ER_ERROR_ON_RENAME, MYF(0), from, to, error);
DBUG_RETURN(error != 0);
}
--- 1.134/support-files/mysql.spec.sh 2006-04-01 05:53:26 +02:00
+++ 1.135/support-files/mysql.spec.sh 2006-05-03 02:39:53 +02:00
@@ -335,7 +335,7 @@
fi
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
# Save the perror binary so it supports the NDB error codes (BUG#13740)
-mv extra/perror extra/perror.ndb
+./libtool --mode=execute cp extra/perror extra/perror.ndb
# Install the ndb binaries
(cd ndb; make install DESTDIR=$RBR)
@@ -488,7 +488,7 @@
# owns all database files.
chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir
-# Initiate databases
+# Initiate databases if needed
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
# Change permissions again to fix any new files.
@@ -572,30 +572,25 @@
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
-%attr(755, root, root) %{_bindir}/myisamchk
+%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/myisam_ftdump
+%attr(755, root, root) %{_bindir}/myisamchk
%attr(755, root, root) %{_bindir}/myisamlog
%attr(755, root, root) %{_bindir}/myisampack
-%attr(755, root, root) %{_bindir}/my_print_defaults
-%attr(755, root, root) %{_bindir}/mysqlbug
%attr(755, root, root) %{_bindir}/mysql_convert_table_format
%attr(755, root, root) %{_bindir}/mysql_create_system_tables
-%attr(755, root, root) %{_bindir}/mysqld_multi
-%attr(755, root, root) %{_bindir}/mysqld_safe
%attr(755, root, root) %{_bindir}/mysql_explain_log
%attr(755, root, root) %{_bindir}/mysql_fix_extensions
%attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables
-%attr(755, root, root) %{_bindir}/mysqlhotcopy
%attr(755, root, root) %{_bindir}/mysql_install_db
%attr(755, root, root) %{_bindir}/mysql_secure_installation
%attr(755, root, root) %{_bindir}/mysql_setpermission
-%attr(755, root, root) %{_bindir}/mysqltest
%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql
%attr(755, root, root) %{_bindir}/mysql_zap
%attr(755, root, root) %{_bindir}/perror
%attr(755, root, root) %{_bindir}/replace
-%attr(755, root, root) %{_bindir}/resolveip
%attr(755, root, root) %{_bindir}/resolve_stack_dump
+%attr(755, root, root) %{_bindir}/resolveip
%attr(755, root, root) %{_bindir}/safe_mysqld
%attr(755, root, root) %{_sbindir}/mysqld
--- 1.122/sql/item_subselect.cc 2005-11-23 08:00:44 +01:00
+++ 1.123/sql/item_subselect.cc 2006-05-03 02:39:53 +02:00
@@ -936,6 +936,10 @@
{
bool tmp;
Item *having= item, *orig_item= item;
+ select_lex->item_list.empty();
+ select_lex->item_list.push_back(new Item_int("Not_used",
+ (longlong) 1, 21));
+ select_lex->ref_pointer_array[0]= select_lex->item_list.head();
item= func->create(expr, item);
if (!abort_on_null && orig_item->maybe_null)
{
--- 1.5/ndb/include/kernel/signaldata/TcKeyReq.hpp 2004-11-15 21:40:32 +01:00
+++ 1.6/ndb/include/kernel/signaldata/TcKeyReq.hpp 2006-05-03 01:15:21 +02:00
@@ -39,6 +39,7 @@
friend class NdbOperation;
friend class NdbIndexOperation;
friend class NdbScanOperation;
+ friend class NdbBlob;
friend class DbUtil;
/**
--- 1.28/ndb/test/ndbapi/testBlobs.cpp 2006-02-05 23:05:16 +01:00
+++ 1.29/ndb/test/ndbapi/testBlobs.cpp 2006-05-03 01:15:21 +02:00
@@ -44,6 +44,7 @@
bool m_dbg;
bool m_dbgall;
const char* m_dbug;
+ bool m_fac;
bool m_full;
unsigned m_loop;
unsigned m_parts;
@@ -72,6 +73,7 @@
m_dbg(false),
m_dbgall(false),
m_dbug(0),
+ m_fac(false),
m_full(false),
m_loop(1),
m_parts(10),
@@ -110,6 +112,7 @@
<< " -dbg print debug" << endl
<< " -dbgall print also NDB API debug (if compiled in)" << endl
<< " -dbug opt dbug options" << endl
+ << " -fac fetch across commit in scan delete [" << d.m_fac
<< "]" << endl
<< " -full read/write only full blob values" << endl
<< " -loop N loop N times 0=forever [" << d.m_loop << "]"
<< endl
<< " -parts N max parts in blob value [" << d.m_parts << "]"
<< endl
@@ -1255,23 +1258,11 @@
CHK((ret = g_ops->nextResult(false)) == 0 || ret == 1 || ret == 2);
if (++n == g_opt.m_batch || ret == 2) {
DBG("execute batch: n=" << n << " ret=" << ret);
- switch (0) {
- case 0: // works normally
+ if (! g_opt.m_fac) {
CHK(g_con->execute(NoCommit) == 0);
- CHK(true || g_con->restart() == 0);
- break;
- case 1: // nonsense - g_con is invalid for 2nd batch
- CHK(g_con->execute(Commit) == 0);
- CHK(true || g_con->restart() == 0);
- break;
- case 2: // DBTC sendSignalErrorRefuseLab
- CHK(g_con->execute(NoCommit) == 0);
- CHK(g_con->restart() == 0);
- break;
- case 3: // 266 time-out
+ } else {
CHK(g_con->execute(Commit) == 0);
CHK(g_con->restart() == 0);
- break;
}
n = 0;
}
@@ -1816,6 +1807,10 @@
g_opt.m_dbug = strdup(argv[0]);
continue;
}
+ }
+ if (strcmp(arg, "-fac") == 0) {
+ g_opt.m_fac = true;
+ continue;
}
if (strcmp(arg, "-full") == 0) {
g_opt.m_full = true;
--- 1.17/ndb/tools/delete_all.cpp 2006-02-05 22:50:58 +01:00
+++ 1.18/ndb/tools/delete_all.cpp 2006-05-03 02:39:53 +02:00
@@ -23,17 +23,21 @@
#include <NDBT.hpp>
static int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
- bool commit_across_open_cursor, int parallelism=240);
+ bool fetch_across_commit, int parallelism=240);
NDB_STD_OPTS_VARS;
static const char* _dbname = "TEST_DB";
+static my_bool _transactional = false;
static struct my_option my_long_options[] =
{
NDB_STD_OPTS("ndb_desc"),
{ "database", 'd', "Name of database table is in",
(gptr*) &_dbname, (gptr*) &_dbname, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+ { "transactional", 't', "Single transaction (may run out of operations)",
+ (gptr*) &_transactional, (gptr*) &_transactional, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
static void usage()
@@ -84,18 +88,11 @@
ndbout << " Table " << argv[i] << " does not exist!" <<
endl;
return NDBT_ProgramExit(NDBT_WRONGARGS);
}
- // Check if we have any blobs
- bool commit_across_open_cursor = true;
- for (int j = 0; j < pTab->getNoOfColumns(); j++) {
- NdbDictionary::Column::Type t = pTab->getColumn(j)->getType();
- if (t == NdbDictionary::Column::Blob ||
- t == NdbDictionary::Column::Text) {
- commit_across_open_cursor = false;
- break;
- }
- }
- ndbout << "Deleting all from " << argv[i] << "...";
- if(clear_table(&MyNdb, pTab, commit_across_open_cursor) == NDBT_FAILED){
+ ndbout << "Deleting all from " << argv[i];
+ if (! _transactional)
+ ndbout << " (non-transactional)";
+ ndbout << " ...";
+ if(clear_table(&MyNdb, pTab, ! _transactional) == NDBT_FAILED){
res = NDBT_FAILED;
ndbout << "FAILED" << endl;
}
@@ -105,7 +102,7 @@
int clear_table(Ndb* pNdb, const NdbDictionary::Table* pTab,
- bool commit_across_open_cursor, int parallelism)
+ bool fetch_across_commit, int parallelism)
{
// Scan all records exclusive and delete
// them one by one
@@ -136,7 +133,7 @@
}
goto failed;
}
-
+
pOp = pTrans->getNdbScanOperation(pTab->getName());
if (pOp == NULL) {
goto failed;
@@ -166,7 +163,7 @@
} while((check = pOp->nextResult(false)) == 0);
if(check != -1){
- if (commit_across_open_cursor) {
+ if (fetch_across_commit) {
check = pTrans->execute(NdbTransaction::Commit);
pTrans->restart(); // new tx id
} else {
--- 1.34/mysql-test/r/auto_increment.result 2005-06-06 19:41:49 +02:00
+++ 1.35/mysql-test/r/auto_increment.result 2006-05-03 02:39:52 +02:00
@@ -394,3 +394,26 @@
2 1
3 1
drop table t1;
+CREATE TABLE `t1` (
+t1_name VARCHAR(255) DEFAULT NULL,
+t1_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+KEY (t1_name),
+PRIMARY KEY (t1_id)
+) AUTO_INCREMENT = 1000;
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+SELECT * from t1;
+t1_name t1_id
+MySQL 1000
+MySQL 1001
+MySQL 1002
+SHOW CREATE TABLE `t1`;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t1_name` varchar(255) default NULL,
+ `t1_id` int(10) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`t1_id`),
+ KEY `t1_name` (`t1_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
+DROP TABLE `t1`;
--- 1.33/mysql-test/r/null.result 2005-08-27 07:23:33 +02:00
+++ 1.34/mysql-test/r/null.result 2006-05-03 01:15:21 +02:00
@@ -278,3 +278,45 @@
c01 c02 c03 c04 c05 c08 c09
str str 0 1 2 1 1
set names latin1;
+create table bug19145a (e enum('a','b','c') default 'b' , s set('x', 'y', 'z')
default 'y' ) engine=MyISAM;
+create table bug19145b (e enum('a','b','c') default null, s set('x', 'y', 'z')
default null) engine=MyISAM;
+create table bug19145c (e enum('a','b','c') not null default 'b' , s set('x', 'y', 'z')
not null default 'y' ) engine=MyISAM;
+create table bug19145setnotnulldefaultnull (e enum('a','b','c') default null, s
set('x', 'y', 'z') not null default null) engine=MyISAM;
+ERROR 42000: Invalid default value for 's'
+create table bug19145enumnotnulldefaultnull (e enum('a','b','c') not null default null, s
set('x', 'y', 'z') default null) engine=MyISAM;
+ERROR 42000: Invalid default value for 'e'
+alter table bug19145a alter column e set default null;
+alter table bug19145a alter column s set default null;
+alter table bug19145a add column (i int);
+alter table bug19145b alter column e set default null;
+alter table bug19145b alter column s set default null;
+alter table bug19145b add column (i int);
+alter table bug19145c alter column e set default null;
+ERROR 42000: Invalid default value for 'e'
+alter table bug19145c alter column s set default null;
+ERROR 42000: Invalid default value for 's'
+alter table bug19145c add column (i int);
+show create table bug19145a;
+Table Create Table
+bug19145a CREATE TABLE `bug19145a` (
+ `e` enum('a','b','c') default NULL,
+ `s` set('x','y','z') default NULL,
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table bug19145b;
+Table Create Table
+bug19145b CREATE TABLE `bug19145b` (
+ `e` enum('a','b','c') default NULL,
+ `s` set('x','y','z') default NULL,
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table bug19145c;
+Table Create Table
+bug19145c CREATE TABLE `bug19145c` (
+ `e` enum('a','b','c') NOT NULL default 'b',
+ `s` set('x','y','z') NOT NULL default 'y',
+ `i` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table bug19145a;
+drop table bug19145b;
+drop table bug19145c;
--- 1.24/mysql-test/t/auto_increment.test 2005-07-28 16:09:48 +02:00
+++ 1.25/mysql-test/t/auto_increment.test 2006-05-03 01:15:21 +02:00
@@ -219,6 +219,25 @@
CHECK TABLE t1;
DROP TABLE IF EXISTS t1;
+# BUG #19025:
+
+CREATE TABLE `t1` (
+ t1_name VARCHAR(255) DEFAULT NULL,
+ t1_id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ KEY (t1_name),
+ PRIMARY KEY (t1_id)
+) AUTO_INCREMENT = 1000;
+
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+INSERT INTO t1 (t1_name) VALUES('MySQL');
+
+SELECT * from t1;
+
+SHOW CREATE TABLE `t1`;
+
+DROP TABLE `t1`;
+
# End of 4.1 tests
#
--- 1.19/mysql-test/t/null.test 2005-07-28 15:12:35 +02:00
+++ 1.20/mysql-test/t/null.test 2006-05-03 01:15:21 +02:00
@@ -190,4 +190,45 @@
# Restore charset to the default value.
set names latin1;
+#
+# Bug#19145: mysqld crashes if you set the default value of an enum field to NULL
+#
+create table bug19145a (e enum('a','b','c') default 'b' , s set('x', 'y', 'z')
default 'y' ) engine=MyISAM;
+create table bug19145b (e enum('a','b','c') default null, s set('x', 'y', 'z')
default null) engine=MyISAM;
+
+create table bug19145c (e enum('a','b','c') not null default 'b' , s set('x', 'y', 'z')
not null default 'y' ) engine=MyISAM;
+
+# Invalid default value for 's'
+--error 1067
+create table bug19145setnotnulldefaultnull (e enum('a','b','c') default null, s
set('x', 'y', 'z') not null default null) engine=MyISAM;
+
+# Invalid default value for 'e'
+--error 1067
+create table bug19145enumnotnulldefaultnull (e enum('a','b','c') not null default null, s
set('x', 'y', 'z') default null) engine=MyISAM;
+
+alter table bug19145a alter column e set default null;
+alter table bug19145a alter column s set default null;
+alter table bug19145a add column (i int);
+
+alter table bug19145b alter column e set default null;
+alter table bug19145b alter column s set default null;
+alter table bug19145b add column (i int);
+
+# Invalid default value for 'e'
+--error 1067
+alter table bug19145c alter column e set default null;
+
+# Invalid default value for 's'
+--error 1067
+alter table bug19145c alter column s set default null;
+alter table bug19145c add column (i int);
+
+show create table bug19145a;
+show create table bug19145b;
+show create table bug19145c;
+
+drop table bug19145a;
+drop table bug19145b;
+drop table bug19145c;
+
# End of 4.1 tests
--- 1.21/mysql-test/r/symlink.result 2006-01-24 08:30:47 +01:00
+++ 1.22/mysql-test/r/symlink.result 2006-05-03 02:39:53 +02:00
@@ -40,7 +40,7 @@
`b` char(16) NOT NULL,
`c` int(11) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX
DIRECTORY='MYSQLTEST_VARDIR/run/'
+) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA
DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
alter table t9 rename t8, add column d int not null;
alter table t8 rename t7;
rename table t7 to t9;
@@ -71,7 +71,7 @@
`c` int(11) NOT NULL,
`d` int(11) NOT NULL,
PRIMARY KEY (`a`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX
DIRECTORY='MYSQLTEST_VARDIR/run/'
+) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA
DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/'
drop database mysqltest;
create table t1 (a int not null) engine=myisam;
show create table t1;
--- 1.17/mysql-test/r/ndb_blob.result 2006-02-03 15:26:07 +01:00
+++ 1.18/mysql-test/r/ndb_blob.result 2006-05-03 01:15:20 +02:00
@@ -481,14 +481,22 @@
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
-so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).');
+so bad data will not crash kernel.');
select * from t1;
id msg
1 Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).
+drop table t1;
+create table t1 (
+a int primary key not null auto_increment,
+b text
+) engine=ndbcluster;
+select count(*) from t1;
+count(*)
+500
+truncate t1;
+select count(*) from t1;
+count(*)
+0
drop table t1;
--- 1.16/mysql-test/t/ndb_blob.test 2006-02-03 15:26:07 +01:00
+++ 1.17/mysql-test/t/ndb_blob.test 2006-05-03 01:15:21 +02:00
@@ -403,10 +403,29 @@
insert into t1 (msg) values(
'Tries to validate (8 byte length + inline bytes) as UTF8 :(
Fast fix: removed validation for Text. It is not yet indexable
-so bad data will not crash kernel.
-Proper fix: Set inline bytes to multiple of mbmaxlen and
-validate it (after the 8 byte length).');
+so bad data will not crash kernel.');
select * from t1;
+drop table t1;
+
+# -- bug #19201
+create table t1 (
+ a int primary key not null auto_increment,
+ b text
+) engine=ndbcluster;
+--disable_query_log
+set autocommit=1;
+# more rows than batch size (64)
+# for this bug no blob parts would be necessary
+let $1 = 500;
+while ($1)
+{
+ insert into t1 (b) values (repeat('x',4000));
+ dec $1;
+}
+--enable_query_log
+select count(*) from t1;
+truncate t1;
+select count(*) from t1;
drop table t1;
# End of 4.1 tests
--- 1.16/ndb/include/ndbapi/NdbBlob.hpp 2005-09-20 10:25:25 +02:00
+++ 1.17/ndb/include/ndbapi/NdbBlob.hpp 2006-05-03 01:15:21 +02:00
@@ -290,6 +290,7 @@
bool isWriteOp();
bool isDeleteOp();
bool isScanOp();
+ bool isTakeOverOp();
// computations
Uint32 getPartNumber(Uint64 pos);
Uint32 getPartCount();
--- 1.26/ndb/src/ndbapi/NdbBlob.cpp 2006-02-03 15:27:06 +01:00
+++ 1.27/ndb/src/ndbapi/NdbBlob.cpp 2006-05-03 01:15:21 +02:00
@@ -23,6 +23,7 @@
#include <NdbBlob.hpp>
#include "NdbBlobImpl.hpp"
#include <NdbScanOperation.hpp>
+#include <signaldata/TcKeyReq.hpp>
/*
* Reading index table directly (as a table) is faster but there are
@@ -264,6 +265,13 @@
theNdbOp->theOperationType == NdbOperation::OpenRangeScanRequest;
}
+inline bool
+NdbBlob::isTakeOverOp()
+{
+ return
+ TcKeyReq::getTakeOverScanFlag(theNdbOp->theScanInfo);
+}
+
// computations (inline)
inline Uint32
@@ -1203,8 +1211,22 @@
if (isUpdateOp() || isWriteOp() || isDeleteOp()) {
// add operation before this one to read head+inline
NdbOperation* tOp = theNdbCon->getNdbOperation(theTable, theNdbOp);
+ /*
+ * If main op is from take over scan lock, the added read is done
+ * as committed read:
+ *
+ * In normal transactional case, the row is locked by us and
+ * committed read returns same as normal read.
+ *
+ * In current TRUNCATE TABLE, the deleting trans is committed in
+ * batches and then restarted with new trans id. A normal read
+ * would hang on the scan delete lock and then fail.
+ */
+ NdbOperation::LockMode lockMode =
+ ! isTakeOverOp() ?
+ NdbOperation::LM_Read : NdbOperation::LM_CommittedRead;
if (tOp == NULL ||
- tOp->readTuple() == -1 ||
+ tOp->readTuple(lockMode) == -1 ||
setTableKeyValue(tOp) == -1 ||
getHeadInlineValue(tOp) == -1) {
setErrorCode(tOp);
--- 1.92/mysql-test/r/mysqldump.result 2006-03-10 20:23:00 +01:00
+++ 1.93/mysql-test/r/mysqldump.result 2006-05-03 02:39:52 +02:00
@@ -655,7 +655,6 @@
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
@@ -2693,3 +2692,41 @@
select 42
drop function f;
drop procedure p;
+create table `t1` (
+t1_name varchar(255) default null,
+t1_id int(10) unsigned not null auto_increment,
+key (t1_name),
+primary key (t1_id)
+) auto_increment = 1000 default charset=latin1;
+insert into t1 (t1_name) values('bla');
+insert into t1 (t1_name) values('bla');
+insert into t1 (t1_name) values('bla');
+select * from t1;
+t1_name t1_id
+bla 1000
+bla 1001
+bla 1002
+show create table `t1`;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t1_name` varchar(255) default NULL,
+ `t1_id` int(10) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`t1_id`),
+ KEY `t1_name` (`t1_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
+DROP TABLE `t1`;
+select * from t1;
+t1_name t1_id
+bla 1000
+bla 1001
+bla 1002
+show create table `t1`;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t1_name` varchar(255) default NULL,
+ `t1_id` int(10) unsigned NOT NULL auto_increment,
+ PRIMARY KEY (`t1_id`),
+ KEY `t1_name` (`t1_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1
+drop table `t1`;
+>>>>>>>
--- 1.84/mysql-test/t/mysqldump.test 2006-03-02 16:28:41 +01:00
+++ 1.85/mysql-test/t/mysqldump.test 2006-05-03 02:39:53 +02:00
@@ -711,6 +711,49 @@
select * from t1;
drop table t1;
+
+#
+# BUG #12123
+#
+create table t1 (a text character set utf8, b text character set latin1);
+insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
+select * from t1;
+--exec $MYSQL_DUMP --tab=$MYSQL_TEST_DIR/var/tmp/ test
+--exec $MYSQL test < $MYSQL_TEST_DIR/var/tmp/t1.sql
+--exec $MYSQL_IMPORT test $MYSQL_TEST_DIR/var/tmp/t1.txt
+select * from t1;
+
+drop table t1;
+
+#
+# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
+#
+create table `t1` (
+ t1_name varchar(255) default null,
+ t1_id int(10) unsigned not null auto_increment,
+ key (t1_name),
+ primary key (t1_id)
+) auto_increment = 1000 default charset=latin1;
+
+insert into t1 (t1_name) values('bla');
+insert into t1 (t1_name) values('bla');
+insert into t1 (t1_name) values('bla');
+
+select * from t1;
+
+show create table `t1`;
+
+--exec $MYSQL_DUMP --skip-comments test t1 > $MYSQLTEST_VARDIR/tmp/bug19025.sql
+DROP TABLE `t1`;
+
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug19025.sql
+
+select * from t1;
+
+show create table `t1`;
+
+drop table `t1`;
+
# End of 4.1 tests
#
@@ -1112,4 +1155,3 @@
show create procedure p;
drop function f;
drop procedure p;
-
--- 1.14/mysql-test/r/gis-rtree.result 2005-08-27 15:10:39 +02:00
+++ 1.15/mysql-test/r/gis-rtree.result 2006-05-03 01:15:20 +02:00
@@ -294,7 +294,7 @@
`g` geometry NOT NULL,
PRIMARY KEY (`fid`),
SPATIAL KEY `g` (`g`(32))
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
+) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=latin1
SELECT count(*) FROM t2;
count(*)
100
| Thread |
|---|
| • bk commit into 5.0 tree (tnurnberg:1.2107) | Tatjana A Nuernberg | 3 May |