Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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@stripped, 2007-04-02 10:50:39+02:00, msvensson@stripped +11 -0
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
MERGE: 1.2410.2.33
mysql-test/mysql-test-run.pl@stripped, 2007-04-02 10:50:16+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.211.1.8
mysql-test/r/create.result@stripped, 2007-04-02 10:50:16+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.124.1.2
mysql-test/r/gis.result@stripped, 2007-04-02 10:50:35+02:00, msvensson@stripped +0 -0
SCCS merged
MERGE: 1.41.1.2
mysql-test/r/type_datetime.result@stripped, 2007-04-02 10:50:16+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.33.1.1
mysql-test/t/gis.test@stripped, 2007-04-02 10:50:35+02:00, msvensson@stripped +0 -0
SCCS merged
MERGE: 1.34.1.2
sql/field.h@stripped, 2007-04-02 10:50:16+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.197.1.1
sql/item.h@stripped, 2007-04-02 10:50:16+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.223.1.1
sql/item_func.cc@stripped, 2007-04-02 10:50:17+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.328.1.1
sql/item_strfunc.cc@stripped, 2007-04-02 10:50:17+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.298.1.1
sql/item_sum.cc@stripped, 2007-04-02 10:50:17+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.196.3.1
sql/sql_yacc.yy@stripped, 2007-04-02 10:50:17+02:00, msvensson@stripped +0 -0
Auto merged
MERGE: 1.511.1.2
# 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: msvensson
# Host: pilot.blaudden
# Root: /home/msvensson/mysql/mysql-5.0-maint/RESYNC
--- 1.199/sql/field.h 2007-03-26 13:14:21 +02:00
+++ 1.200/sql/field.h 2007-04-02 10:50:16 +02:00
@@ -306,8 +306,6 @@ public:
virtual void set_derivation(enum Derivation derivation_arg) { }
bool set_warning(MYSQL_ERROR::enum_warning_level, unsigned int code,
int cuted_increment);
- bool check_int(const char *str, int length, const char *int_end,
- CHARSET_INFO *cs);
void set_datetime_warning(MYSQL_ERROR::enum_warning_level, uint code,
const char *str, uint str_len,
timestamp_type ts_type, int cuted_increment);
@@ -369,6 +367,11 @@ public:
bool eq_def(Field *field);
int store_decimal(const my_decimal *);
my_decimal *val_decimal(my_decimal *);
+ int check_int(CHARSET_INFO *cs, const char *str, int length,
+ const char *int_end, int error);
+ bool get_int(CHARSET_INFO *cs, const char *from, uint len,
+ longlong *rnd, ulonglong unsigned_max,
+ longlong signed_min, longlong signed_max);
};
--- 1.224/sql/item.h 2007-03-22 09:21:02 +01:00
+++ 1.225/sql/item.h 2007-04-02 10:50:16 +02:00
@@ -694,12 +694,11 @@ public:
virtual bool get_date_result(TIME *ltime,uint fuzzydate)
{ return get_date(ltime,fuzzydate); }
/*
- This function is used only in Item_func_isnull/Item_func_isnotnull
- (implementations of IS NULL/IS NOT NULL clauses). Item_func_is{not}null
- calls this method instead of one of val/result*() methods, which
- normally will set null_value. This allows to determine nullness of
- a complex expression without fully evaluating it.
- Any new item which can be NULL must implement this call.
+ The method allows to determine nullness of a complex expression
+ without fully evaluating it, instead of calling val/result*() then
+ checking null_value. Used in Item_func_isnull/Item_func_isnotnull
+ and Item_sum_count/Item_sum_count_distinct.
+ Any new item which can be NULL must implement this method.
*/
virtual bool is_null() { return 0; }
--- 1.329/sql/item_func.cc 2007-03-28 10:22:20 +02:00
+++ 1.330/sql/item_func.cc 2007-04-02 10:50:17 +02:00
@@ -5035,7 +5035,7 @@ Item_func_sp::func_name() const
{
THD *thd= current_thd;
/* Calculate length to avoid reallocation of string for sure */
- uint len= ((m_name->m_db.length +
+ uint len= ((m_name->m_explicit_name ? m_name->m_db.length : 0 +
m_name->m_name.length)*2 + //characters*quoting
2 + // ` and `
1 + // .
@@ -5045,8 +5045,11 @@ Item_func_sp::func_name() const
system_charset_info);
qname.length(0);
- append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
- qname.append('.');
+ if (m_name->m_explicit_name)
+ {
+ append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
+ qname.append('.');
+ }
append_identifier(thd, &qname, m_name->m_name.str, m_name->m_name.length);
return qname.ptr();
}
--- 1.299/sql/item_strfunc.cc 2007-03-28 09:34:02 +02:00
+++ 1.300/sql/item_strfunc.cc 2007-04-02 10:50:17 +02:00
@@ -1805,7 +1805,8 @@ void Item_func_soundex::fix_length_and_d
{
collation.set(args[0]->collation);
max_length=args[0]->max_length;
- set_if_bigger(max_length,4);
+ set_if_bigger(max_length, 4 * collation.collation->mbminlen);
+ tmp_value.set_charset(collation.collation);
}
@@ -1815,14 +1816,15 @@ void Item_func_soundex::fix_length_and_d
else return 0
*/
-static char soundex_toupper(char ch)
+static int soundex_toupper(int ch)
{
return (ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch;
}
-static char get_scode(char *ptr)
+
+static char get_scode(int wc)
{
- uchar ch= soundex_toupper(*ptr);
+ int ch= soundex_toupper(wc);
if (ch < 'A' || ch > 'Z')
{
// Thread extended alfa (country spec)
@@ -1832,46 +1834,121 @@ static char get_scode(char *ptr)
}
+static bool my_uni_isalpha(int wc)
+{
+ /*
+ Return true for all Basic Latin letters: a..z A..Z.
+ Return true for all Unicode characters with code higher than U+00C0:
+ - characters between 'z' and U+00C0 are controls and punctuations.
+ - "U+00C0 LATIN CAPITAL LETTER A WITH GRAVE" is the first letter after 'z'.
+ */
+ return (wc >= 'a' && wc <= 'z') ||
+ (wc >= 'A' && wc <= 'Z') ||
+ (wc >= 0xC0);
+}
+
+
String *Item_func_soundex::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res =args[0]->val_str(str);
char last_ch,ch;
CHARSET_INFO *cs= collation.collation;
+ my_wc_t wc;
+ uint nchars;
+ int rc;
- if ((null_value=args[0]->null_value))
+ if ((null_value= args[0]->null_value))
return 0; /* purecov: inspected */
- if (tmp_value.alloc(max(res->length(),4)))
+ if (tmp_value.alloc(max(res->length(), 4 * cs->mbminlen)))
return str; /* purecov: inspected */
char *to= (char *) tmp_value.ptr();
- char *from= (char *) res->ptr(), *end=from+res->length();
- tmp_value.set_charset(cs);
+ char *to_end= to + tmp_value.alloced_length();
+ char *from= (char *) res->ptr(), *end= from + res->length();
- while (from != end && !my_isalpha(cs,*from)) // Skip pre-space
- from++; /* purecov: inspected */
- if (from == end)
- return &my_empty_string; // No alpha characters.
- *to++ = soundex_toupper(*from); // Copy first letter
- last_ch = get_scode(from); // code of the first letter
- // for the first 'double-letter check.
- // Loop on input letters until
- // end of input (null) or output
- // letter code count = 3
- for (from++ ; from < end ; from++)
+ for ( ; ; ) /* Skip pre-space */
{
- if (!my_isalpha(cs,*from))
- continue;
- ch=get_scode(from);
+ if ((rc= cs->cset->mb_wc(cs, &wc, (uchar*) from, (uchar*) end)) <= 0)
+ return &my_empty_string; /* EOL or invalid byte sequence */
+
+ if (rc == 1 && cs->ctype)
+ {
+ /* Single byte letter found */
+ if (my_isalpha(cs, *from))
+ {
+ last_ch= get_scode(*from); // Code of the first letter
+ *to++= soundex_toupper(*from++); // Copy first letter
+ break;
+ }
+ from++;
+ }
+ else
+ {
+ from+= rc;
+ if (my_uni_isalpha(wc))
+ {
+ /* Multibyte letter found */
+ wc= soundex_toupper(wc);
+ last_ch= get_scode(wc); // Code of the first letter
+ if ((rc= cs->cset->wc_mb(cs, wc, (uchar*) to, (uchar*) to_end)) <= 0)
+ {
+ /* Extra safety - should not really happen */
+ DBUG_ASSERT(false);
+ return &my_empty_string;
+ }
+ to+= rc;
+ break;
+ }
+ }
+ }
+
+ /*
+ last_ch is now set to the first 'double-letter' check.
+ loop on input letters until end of input
+ */
+ for (nchars= 1 ; ; )
+ {
+ if ((rc= cs->cset->mb_wc(cs, &wc, (uchar*) from, (uchar*) end)) <= 0)
+ break; /* EOL or invalid byte sequence */
+
+ if (rc == 1 && cs->ctype)
+ {
+ if (!my_isalpha(cs, *from++))
+ continue;
+ }
+ else
+ {
+ from+= rc;
+ if (!my_uni_isalpha(wc))
+ continue;
+ }
+
+ ch= get_scode(wc);
if ((ch != '0') && (ch != last_ch)) // if not skipped or double
{
- *to++ = ch; // letter, copy to output
- last_ch = ch; // save code of last input letter
- } // for next double-letter check
+ // letter, copy to output
+ if ((rc= cs->cset->wc_mb(cs, (my_wc_t) ch,
+ (uchar*) to, (uchar*) to_end)) <= 0)
+ {
+ // Extra safety - should not really happen
+ DBUG_ASSERT(false);
+ break;
+ }
+ to+= rc;
+ nchars++;
+ last_ch= ch; // save code of last input letter
+ } // for next double-letter check
}
- for (end=(char*) tmp_value.ptr()+4 ; to < end ; to++)
- *to = '0';
- *to=0; // end string
+
+ /* Pad up to 4 characters with DIGIT ZERO, if the string is shorter */
+ if (nchars < 4)
+ {
+ uint nbytes= (4 - nchars) * cs->mbminlen;
+ cs->cset->fill(cs, to, nbytes, '0');
+ to+= nbytes;
+ }
+
tmp_value.length((uint) (to-tmp_value.ptr()));
return &tmp_value;
}
--- 1.204/sql/item_sum.cc 2007-03-29 18:20:31 +02:00
+++ 1.205/sql/item_sum.cc 2007-04-02 10:50:17 +02:00
@@ -1080,14 +1080,8 @@ void Item_sum_count::clear()
bool Item_sum_count::add()
{
- if (!args[0]->maybe_null)
+ if (!args[0]->maybe_null || !args[0]->is_null())
count++;
- else
- {
- args[0]->update_null_value();
- if (!args[0]->null_value)
- count++;
- }
return 0;
}
@@ -1921,14 +1915,8 @@ void Item_sum_count::reset_field()
char *res=result_field->ptr;
longlong nr=0;
- if (!args[0]->maybe_null)
+ if (!args[0]->maybe_null || !args[0]->is_null())
nr=1;
- else
- {
- args[0]->update_null_value();
- if (!args[0]->null_value)
- nr=1;
- }
int8store(res,nr);
}
@@ -2031,14 +2019,8 @@ void Item_sum_count::update_field()
char *res=result_field->ptr;
nr=sint8korr(res);
- if (!args[0]->maybe_null)
+ if (!args[0]->maybe_null || !args[0]->is_null())
nr++;
- else
- {
- args[0]->update_null_value();
- if (!args[0]->null_value)
- nr++;
- }
int8store(res,nr);
}
@@ -2462,12 +2444,8 @@ bool Item_sum_count_distinct::setup(THD
Item *item=args[i];
if (list.push_back(item))
return TRUE; // End of memory
- if (item->const_item())
- {
- item->update_null_value();
- if (item->null_value)
- always_null=1;
- }
+ if (item->const_item() && item->is_null())
+ always_null= 1;
}
if (always_null)
return FALSE;
--- 1.513/sql/sql_yacc.yy 2007-03-26 15:52:51 +02:00
+++ 1.514/sql/sql_yacc.yy 2007-04-02 10:50:17 +02:00
@@ -1577,7 +1577,7 @@ sp_name:
my_error(ER_SP_WRONG_NAME, MYF(0), $3.str);
MYSQL_YYABORT;
}
- $$= new sp_name($1, $3);
+ $$= new sp_name($1, $3, true);
$$->init_qname(YYTHD);
}
| ident
@@ -1591,7 +1591,7 @@ sp_name:
}
if (thd->copy_db_to(&db.str, &db.length))
MYSQL_YYABORT;
- $$= new sp_name(db, $1);
+ $$= new sp_name(db, $1, false);
if ($$)
$$->init_qname(YYTHD);
}
@@ -5041,7 +5041,7 @@ simple_expr:
| ident '.' ident '(' opt_expr_list ')'
{
LEX *lex= Lex;
- sp_name *name= new sp_name($1, $3);
+ sp_name *name= new sp_name($1, $3, true);
name->init_qname(YYTHD);
sp_add_used_routine(lex, YYTHD, name, TYPE_ENUM_FUNCTION);
@@ -5156,7 +5156,7 @@ simple_expr:
LEX_STRING db;
if (thd->copy_db_to(&db.str, &db.length))
MYSQL_YYABORT;
- sp_name *name= new sp_name(db, $1);
+ sp_name *name= new sp_name(db, $1, false);
if (name)
name->init_qname(thd);
@@ -9050,7 +9050,8 @@ grant_ident:
| table_ident
{
LEX *lex=Lex;
- if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL,0))
+ if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL,
+ TL_OPTION_UPDATING))
MYSQL_YYABORT;
if (lex->grant == GLOBAL_ACLS)
lex->grant = TABLE_ACLS & ~GRANT_ACL;
--- 1.212/mysql-test/mysql-test-run.pl 2007-03-23 11:10:22 +01:00
+++ 1.213/mysql-test/mysql-test-run.pl 2007-04-02 10:50:16 +02:00
@@ -304,6 +304,7 @@ our $path_sql_dir;
our @data_dir_lst;
our $used_binlog_format;
+our $used_default_engine;
our $debug_compiled_binaries;
our $glob_tot_real_time= 0;
@@ -519,7 +520,7 @@ sub command_line_setup () {
'compress' => \$opt_compress,
'bench' => \$opt_bench,
'small-bench' => \$opt_small_bench,
- 'with-ndbcluster' => \$opt_with_ndbcluster,
+ 'with-ndbcluster|ndb' => \$opt_with_ndbcluster,
'vs-config' => \$opt_vs_config,
# Control what test suites or cases to run
@@ -776,6 +777,26 @@ sub command_line_setup () {
mtr_report("Using binlog format '$used_binlog_format'");
}
+
+ # --------------------------------------------------------------------------
+ # Find out default storage engine being used(if any)
+ # --------------------------------------------------------------------------
+ if ( $opt_with_ndbcluster )
+ {
+ # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster
+ push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster");
+ }
+
+ foreach my $arg ( @opt_extra_mysqld_opt )
+ {
+ if ( $arg =~ /default-storage-engine=(\S+)/ )
+ {
+ $used_default_engine= $1;
+ }
+ }
+ mtr_report("Using default engine '$used_default_engine'")
+ if defined $used_default_engine;
+
# --------------------------------------------------------------------------
# Check if we should speed up tests by trying to run on tmpfs
# --------------------------------------------------------------------------
@@ -848,20 +869,22 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Check im suport
# --------------------------------------------------------------------------
- if (!$opt_extern)
+ if ($opt_extern)
{
- if ( $mysql_version_id < 50000 ) {
- # Instance manager is not supported until 5.0
- $opt_skip_im= 1;
-
- }
-
- if ( $glob_win32 ) {
- mtr_report("Disable Instance manager - not supported on Windows");
- $opt_skip_im= 1;
- }
-
+ mtr_report("Disable instance manager when running with extern mysqld");
+ $opt_skip_im= 1;
+ }
+ elsif ( $mysql_version_id < 50000 )
+ {
+ # Instance manager is not supported until 5.0
+ $opt_skip_im= 1;
+ }
+ elsif ( $glob_win32 )
+ {
+ mtr_report("Disable Instance manager - testing not supported on Windows");
+ $opt_skip_im= 1;
}
+
# --------------------------------------------------------------------------
# Record flag
# --------------------------------------------------------------------------
@@ -899,10 +922,6 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Ndb cluster flags
# --------------------------------------------------------------------------
- if ( $opt_with_ndbcluster and !$opt_bench)
- {
- mtr_error("Can only use --with-ndbcluster togheter with --bench");
- }
if ( $opt_ndbconnectstring )
{
@@ -1055,8 +1074,6 @@ sub command_line_setup () {
# socket path names.
$sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
- # Put this into a hash, will be a C struct
-
$master->[0]=
{
pid => 0,
@@ -1064,7 +1081,6 @@ sub command_line_setup () {
idx => 0,
path_myddir => "$opt_vardir/master-data",
path_myerr => "$opt_vardir/log/master.err",
- path_mylog => "$opt_vardir/log/master.log",
path_pid => "$opt_vardir/run/master.pid",
path_sock => "$sockdir/master.sock",
port => $opt_master_myport,
@@ -1080,7 +1096,6 @@ sub command_line_setup () {
idx => 1,
path_myddir => "$opt_vardir/master1-data",
path_myerr => "$opt_vardir/log/master1.err",
- path_mylog => "$opt_vardir/log/master1.log",
path_pid => "$opt_vardir/run/master1.pid",
path_sock => "$sockdir/master1.sock",
port => $opt_master_myport + 1,
@@ -1096,7 +1111,6 @@ sub command_line_setup () {
idx => 0,
path_myddir => "$opt_vardir/slave-data",
path_myerr => "$opt_vardir/log/slave.err",
- path_mylog => "$opt_vardir/log/slave.log",
path_pid => "$opt_vardir/run/slave.pid",
path_sock => "$sockdir/slave.sock",
port => $opt_slave_myport,
@@ -1113,7 +1127,6 @@ sub command_line_setup () {
idx => 1,
path_myddir => "$opt_vardir/slave1-data",
path_myerr => "$opt_vardir/log/slave1.err",
- path_mylog => "$opt_vardir/log/slave1.log",
path_pid => "$opt_vardir/run/slave1.pid",
path_sock => "$sockdir/slave1.sock",
port => $opt_slave_myport + 1,
@@ -1129,7 +1142,6 @@ sub command_line_setup () {
idx => 2,
path_myddir => "$opt_vardir/slave2-data",
path_myerr => "$opt_vardir/log/slave2.err",
- path_mylog => "$opt_vardir/log/slave2.log",
path_pid => "$opt_vardir/run/slave2.pid",
path_sock => "$sockdir/slave2.sock",
port => $opt_slave_myport + 2,
@@ -1333,7 +1345,7 @@ sub collect_mysqld_features () {
#
# Execute "mysqld --no-defaults --help --verbose" to get a
- # of all features and settings
+ # list of all features and settings
#
my $list= `$exe_mysqld --no-defaults --verbose --help`;
@@ -1397,6 +1409,40 @@ sub collect_mysqld_features () {
}
+sub run_query($$) {
+ my ($mysqld, $query)= @_;
+
+ my $args;
+ mtr_init_args(\$args);
+
+ mtr_add_arg($args, "--no-defaults");
+ mtr_add_arg($args, "--user=%s", $opt_user);
+ mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
+ mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'});
+ mtr_add_arg($args, "--silent"); # Tab separated output
+ mtr_add_arg($args, "-e '%s'", $query);
+
+ my $cmd= "$exe_mysql " . join(' ', @$args);
+ mtr_verbose("cmd: $cmd");
+ return `$cmd`;
+}
+
+
+sub collect_mysqld_features_from_running_server ()
+{
+ my $list= run_query($master->[0], "use mysql; SHOW VARIABLES");
+
+ foreach my $line (split('\n', $list))
+ {
+ # Put variables into hash
+ if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ )
+ {
+ print "$1=\"$2\"\n";
+ $mysqld_variables{$1}= $2;
+ }
+ }
+}
+
sub executable_setup_im () {
# Look for instance manager binary - mysqlmanager
@@ -1913,7 +1959,7 @@ sub environment_setup () {
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
mtr_native_path($exe_mysqlbinlog) .
- " --no-defaults --local-load=$opt_tmpdir";
+ " --no-defaults";
if (!$opt_extern && $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -3691,8 +3737,10 @@ sub mysqld_arguments ($$$$) {
mtr_add_arg($args, "%s--log-output=table,file", $prefix);
}
- mtr_add_arg($args, "%s--log=%s", $prefix, $mysqld->{'path_mylog'});
-
+ my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx";
+ mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path);
+ mtr_add_arg($args,
+ "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path);
# Check if "extra_opt" contains --skip-log-bin
my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt);
@@ -4992,7 +5040,7 @@ Options to control what engine/variation
skip-ssl Dont start server with support for ssl connections
bench Run the benchmark suite
small-bench Run the benchmarks with --small-tests --small-tables
- with-ndbcluster Use cluster as default table type for benchmark
+ ndb|with-ndbcluster Use cluster as default table type
vs-config Visual Studio configuration used to create executables
(default: MTR_VS_CONFIG environment variable)
--- 1.125/mysql-test/r/create.result 2007-03-22 10:56:40 +01:00
+++ 1.126/mysql-test/r/create.result 2007-04-02 10:50:16 +02:00
@@ -771,3 +771,4 @@ t1 CREATE TABLE `t1` (
drop table t1;
create table t1 (upgrade int);
drop table t1;
+End of 5.0 tests
--- 1.34/mysql-test/r/type_datetime.result 2007-02-08 09:53:17 +01:00
+++ 1.35/mysql-test/r/type_datetime.result 2007-04-02 10:50:16 +02:00
@@ -166,6 +166,9 @@ dt
0000-00-00 00:00:00
0000-00-00 00:00:00
drop table t1;
+select cast('2006-12-05 22:10:10' as datetime) + 0;
+cast('2006-12-05 22:10:10' as datetime) + 0
+20061205221010.000000
CREATE TABLE t1(a DATETIME NOT NULL);
INSERT INTO t1 VALUES ('20060606155555');
SELECT a FROM t1 WHERE a=(SELECT MAX(a) FROM t1) AND (a="20060606155555");
--- 1.42/mysql-test/r/gis.result 2007-03-23 23:28:02 +01:00
+++ 1.43/mysql-test/r/gis.result 2007-04-02 10:50:35 +02:00
@@ -730,6 +730,12 @@ point(b, b) IS NULL linestring(b) IS NUL
1 1 1 1 1 1 1
0 1 1 1 1 1 1
drop table t1;
+CREATE TABLE t1(a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+a
+NULL
+DROP TABLE t1;
End of 4.1 tests
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
@@ -763,6 +769,17 @@ create table t1 (g geometry not null);
insert into t1 values(default);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
+CREATE TABLE t1 (a GEOMETRY);
+CREATE VIEW v1 AS SELECT GeomFromwkb(ASBINARY(a)) FROM t1;
+CREATE VIEW v2 AS SELECT a FROM t1;
+DESCRIBE v1;
+Field Type Null Key Default Extra
+GeomFromwkb(ASBINARY(a)) geometry YES NULL
+DESCRIBE v2;
+Field Type Null Key Default Extra
+a geometry YES NULL
+DROP VIEW v1,v2;
+DROP TABLE t1;
create table t1 (name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
--- 1.35/mysql-test/t/gis.test 2007-03-23 23:28:02 +01:00
+++ 1.36/mysql-test/t/gis.test 2007-04-02 10:50:35 +02:00
@@ -423,6 +423,14 @@ from t1;
drop table t1;
+#
+# Bug #27164: Crash when mixing InnoDB and MyISAM Geospatial tables
+#
+CREATE TABLE t1(a POINT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (NULL);
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 4.1 tests
#
@@ -471,6 +479,17 @@ create table t1 (g geometry not null);
insert into t1 values(default);
drop table t1;
+#
+# Bug #27300: create view with geometry functions lost columns types
+#
+CREATE TABLE t1 (a GEOMETRY);
+CREATE VIEW v1 AS SELECT GeomFromwkb(ASBINARY(a)) FROM t1;
+CREATE VIEW v2 AS SELECT a FROM t1;
+DESCRIBE v1;
+DESCRIBE v2;
+
+DROP VIEW v1,v2;
+DROP TABLE t1;
#
# Bug#24563: MBROverlaps does not seem to function propertly
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2431) | msvensson | 2 Apr |