Skip to content

Commit 09942fe

Browse files
author
Alexander Nozdrin
committed
Manual merge from mysql-trunk-merge.
Conflicts: - include/my_no_pthread.h - mysql-test/r/sp-ucs2.result - sql/log.cc - sql/sql_acl.cc - sql/sql_yacc.yy
2 parents f0ae316 + efe6195 commit 09942fe

File tree

108 files changed

+3402
-1155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3402
-1155
lines changed

client/mysql_upgrade.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,10 @@ static int run_sql_fix_privilege_tables(void)
783783
found_real_errors++;
784784
print_line(line);
785785
}
786+
else if (strncmp(line, "WARNING", 7) == 0)
787+
{
788+
print_line(line);
789+
}
786790
} while ((line= get_line(line)) && *line);
787791
}
788792

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2166,7 +2166,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
21662166
sighold sigset sigthreadmask port_create sleep thr_yield \
21672167
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
21682168
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
2169-
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
2169+
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
21702170

21712171
#
21722172
#

include/my_no_pthread.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,13 @@
5959
#define mysql_rwlock_unlock(A) do {} while (0)
6060
#define mysql_rwlock_destroy(A) do {} while (0)
6161

62+
typedef int my_pthread_once_t;
63+
#define MY_PTHREAD_ONCE_INIT 0
64+
#define MY_PTHREAD_ONCE_DONE 1
65+
66+
#define my_pthread_once(C,F) do { \
67+
if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; } \
68+
} while(0)
69+
6270
#endif
6371
#endif /* MY_NO_PTHREAD_INCLUDED */

include/my_pthread.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ typedef int pthread_mutexattr_t;
6767
#define pthread_handler_t EXTERNC void * __cdecl
6868
typedef void * (__cdecl *pthread_handler)(void *);
6969

70+
typedef volatile LONG my_pthread_once_t;
71+
#define MY_PTHREAD_ONCE_INIT 0
72+
#define MY_PTHREAD_ONCE_INPROGRESS 1
73+
#define MY_PTHREAD_ONCE_DONE 2
74+
7075
/*
7176
Struct and macros to be used in combination with the
7277
windows implementation of pthread_cond_timedwait
@@ -110,6 +115,7 @@ int pthread_cond_destroy(pthread_cond_t *cond);
110115
int pthread_attr_init(pthread_attr_t *connect_att);
111116
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
112117
int pthread_attr_destroy(pthread_attr_t *connect_att);
118+
int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
113119
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
114120
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
115121

@@ -186,6 +192,10 @@ void my_pthread_exit(void *status);
186192
#define pthread_handler_t EXTERNC void *
187193
typedef void *(* pthread_handler)(void *);
188194

195+
#define my_pthread_once_t pthread_once_t
196+
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
197+
#define my_pthread_once(C,F) pthread_once(C,F)
198+
189199
/* Test first for RTS or FSU threads */
190200

191201
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)

include/my_stacktrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
(defined(__alpha__) && defined(__GNUC__))
2424
#define HAVE_STACKTRACE 1
2525
#endif
26-
#elif defined(__WIN__)
26+
#elif defined(__WIN__) || defined(__sun)
2727
#define HAVE_STACKTRACE 1
2828
#endif
2929

include/my_sys.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,6 @@ extern my_bool resolve_collation(const char *cl_name,
978978
CHARSET_INFO *default_cl,
979979
CHARSET_INFO **cl);
980980

981-
extern void free_charsets(void);
982981
extern char *get_charsets_dir(char *buf);
983982
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
984983
extern my_bool init_compiled_charsets(myf flags);

libmysql/libmysql.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ void STDCALL mysql_server_end()
211211
}
212212
else
213213
{
214-
free_charsets();
215214
mysql_thread_end();
216215
}
217216

mysql-test/collections/default.experimental

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ main.log_tables # Bug#47924 2009-10-08 alik main.log_ta
1414
main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled
1515
main.plugin_load # Bug#47146
1616

17-
rpl.rpl_cross_version* # Bug#48340 2009-12-01 Daogang rpl_cross_version: Found warnings/errors in server log file!
1817
rpl.rpl_get_master_version_and_clock* # Bug#49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
1918
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
2019
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically

mysql-test/extra/rpl_tests/rpl_loaddata.test

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,26 @@ connection slave;
2121
reset master;
2222
connection master;
2323

24+
# MTR is not case-sensitive.
25+
let $lower_stmt_head= load data;
26+
let $UPPER_STMT_HEAD= LOAD DATA;
27+
if (`SELECT '$lock_option' <> ''`)
28+
{
29+
#if $lock_option is null, an extra blank is added into the statement,
30+
#this will change the result of rpl_loaddata test case. so $lock_option
31+
#is set only when it is not null.
32+
let $lower_stmt_head= load data $lock_option;
33+
let $UPPER_STMT_HEAD= LOAD DATA $lock_option;
34+
}
35+
2436
select last_insert_id();
2537
create table t1(a int not null auto_increment, b int, primary key(a) );
26-
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
38+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
2739
# verify that LAST_INSERT_ID() is set by LOAD DATA INFILE
2840
select last_insert_id();
2941

3042
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
31-
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
43+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
3244

3345
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
3446
insert into t3 select * from t2;
@@ -56,7 +68,7 @@ sync_with_master;
5668
insert into t1 values(1,10);
5769

5870
connection master;
59-
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
71+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
6072

6173
save_master_pos;
6274
connection slave;
@@ -70,17 +82,19 @@ connection slave;
7082
set global sql_slave_skip_counter=1;
7183
start slave;
7284
sync_with_master;
73-
--replace_result $MASTER_MYPORT MASTER_PORT
74-
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
75-
--query_vertical show slave status;
85+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
86+
echo Last_SQL_Errno=$last_error;
87+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
88+
echo Last_SQL_Error;
89+
echo $last_error;
7690

7791
# Trigger error again to test CHANGE MASTER
7892

7993
connection master;
8094
set sql_log_bin=0;
8195
delete from t1;
8296
set sql_log_bin=1;
83-
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
97+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
8498
save_master_pos;
8599
connection slave;
86100
# The SQL slave thread should be stopped now.
@@ -92,9 +106,11 @@ connection slave;
92106
stop slave;
93107
change master to master_user='test';
94108
change master to master_user='root';
95-
--replace_result $MASTER_MYPORT MASTER_PORT
96-
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
97-
--query_vertical show slave status;
109+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
110+
echo Last_SQL_Errno=$last_error;
111+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
112+
echo Last_SQL_Error;
113+
echo $last_error;
98114

99115
# Trigger error again to test RESET SLAVE
100116

@@ -105,7 +121,7 @@ connection master;
105121
set sql_log_bin=0;
106122
delete from t1;
107123
set sql_log_bin=1;
108-
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
124+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
109125
save_master_pos;
110126
connection slave;
111127
# The SQL slave thread should be stopped now.
@@ -114,9 +130,11 @@ connection slave;
114130
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
115131
stop slave;
116132
reset slave;
117-
--replace_result $MASTER_MYPORT MASTER_PORT
118-
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
119-
--query_vertical show slave status;
133+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
134+
echo Last_SQL_Errno=$last_error;
135+
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
136+
echo Last_SQL_Error;
137+
echo $last_error;
120138

121139
# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE
122140

@@ -125,7 +143,7 @@ reset master;
125143
eval create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
126144
unique(day)) engine=$engine_type; # no transactions
127145
--error ER_DUP_ENTRY
128-
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
146+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
129147
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
130148
'\n##\n' starting by '>' ignore 1 lines;
131149
select * from t2;
@@ -141,7 +159,7 @@ alter table t2 drop key day;
141159
connection master;
142160
delete from t2;
143161
--error ER_DUP_ENTRY
144-
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
162+
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
145163
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
146164
'\n##\n' starting by '>' ignore 1 lines;
147165
connection slave;
@@ -154,7 +172,7 @@ drop table t1, t2;
154172
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
155173

156174
--error ER_DUP_ENTRY
157-
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
175+
eval $UPPER_STMT_HEAD INFILE "../../std_data/words.dat" INTO TABLE t1;
158176

159177
DROP TABLE IF EXISTS t1;
160178

@@ -182,25 +200,25 @@ DROP TABLE IF EXISTS t1;
182200

183201
-- echo ### assertion: works with cross-referenced database
184202
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
185-
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
203+
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
186204

187205
-- eval use $db1
188206
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
189207
-- echo ### assertion: works with fully qualified name on current database
190208
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
191-
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
209+
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
192210

193211
-- echo ### assertion: works without fully qualified name on current database
194212
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
195-
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1
213+
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1
196214

197215
-- echo ### create connection without default database
198216
-- echo ### connect (conn2,localhost,root,,*NO-ONE*);
199217
connect (conn2,localhost,root,,*NO-ONE*);
200218
-- connection conn2
201219
-- echo ### assertion: works without stating the default database
202220
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
203-
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
221+
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
204222
-- echo ### disconnect and switch back to master connection
205223
-- disconnect conn2
206224
-- connection master

mysql-test/include/kill_query.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ if (`SELECT '$debug_lock' != ''`)
5252

5353
# reap the result of the waiting query
5454
connection $connection_name;
55-
error 0, 1317, 1307, 1306, 1334, 1305;
55+
error 0, 1317, 1307, 1306, 1334, 1305, 1034;
5656
reap;
5757

5858
connection master;

mysql-test/r/ctype_ucs.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,26 @@ select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a';
116116
binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a'
117117
1 1 1
118118
SET CHARACTER SET koi8r;
119+
create table t1 (a varchar(2) character set ucs2 collate ucs2_bin, key(a));
120+
insert into t1 values ('A'),('A'),('B'),('C'),('D'),('A\t');
121+
insert into t1 values ('A\0'),('A\0'),('A\0'),('A\0'),('AZ');
122+
select hex(a) from t1 where a like 'A_' order by a;
123+
hex(a)
124+
00410000
125+
00410000
126+
00410000
127+
00410000
128+
00410009
129+
0041005A
130+
select hex(a) from t1 ignore key(a) where a like 'A_' order by a;
131+
hex(a)
132+
00410000
133+
00410000
134+
00410000
135+
00410000
136+
00410009
137+
0041005A
138+
drop table t1;
119139
CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2, word2 CHAR(64) CHARACTER SET ucs2);
120140
INSERT INTO t1 VALUES (_koi8r'�',_koi8r'�'), (X'2004',X'2004');
121141
SELECT hex(word) FROM t1 ORDER BY word;

mysql-test/r/ctype_utf8.result

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,24 @@ select hex(_utf8 B'001111111111');
18481848
ERROR HY000: Invalid utf8 character string: 'FF'
18491849
select (_utf8 X'616263FF');
18501850
ERROR HY000: Invalid utf8 character string: 'FF'
1851+
#
1852+
# Bug#44131 Binary-mode "order by" returns records in incorrect order for UTF-8 strings
1853+
#
1854+
CREATE TABLE t1 (id int not null primary key, name varchar(10)) character set utf8;
1855+
INSERT INTO t1 VALUES
1856+
(2,'一二三01'),(3,'一二三09'),(4,'一二三02'),(5,'一二三08'),
1857+
(6,'一二三11'),(7,'一二三91'),(8,'一二三21'),(9,'一二三81');
1858+
SELECT * FROM t1 ORDER BY BINARY(name);
1859+
id name
1860+
2 一二三01
1861+
4 一二三02
1862+
5 一二三08
1863+
3 一二三09
1864+
6 一二三11
1865+
8 一二三21
1866+
9 一二三81
1867+
7 一二三91
1868+
DROP TABLE t1;
18511869
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL);
18521870
INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065);
18531871
SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b;

mysql-test/r/fulltext.result

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,20 @@ MATCH (col) AGAINST('findme')
560560
DEALLOCATE PREPARE s;
561561
DROP TABLE t1;
562562
#
563+
# Bug #49250 : spatial btree index corruption and crash
564+
# Part two : fulltext syntax check
565+
#
566+
CREATE TABLE t1(col1 TEXT,
567+
FULLTEXT INDEX USING BTREE (col1));
568+
ERROR 42000: 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 'USING BTREE (col1))' at line 2
569+
CREATE TABLE t2(col1 TEXT);
570+
CREATE FULLTEXT INDEX USING BTREE ON t2(col);
571+
ERROR 42000: 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 'USING BTREE ON t2(col)' at line 1
572+
ALTER TABLE t2 ADD FULLTEXT INDEX USING BTREE (col1);
573+
ERROR 42000: 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 'USING BTREE (col1)' at line 1
574+
DROP TABLE t2;
575+
End of 5.0 tests
576+
#
563577
# Bug #47930: MATCH IN BOOLEAN MODE returns too many results
564578
# inside subquery
565579
#

mysql-test/r/func_str.result

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,6 +2561,35 @@ id select_type table type possible_keys key key_len ref rows Extra
25612561
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join buffer
25622562
2 DERIVED t1 ALL NULL NULL NULL NULL 2
25632563
drop table t1;
2564+
#
2565+
# Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0
2566+
#
2567+
DROP TABLE IF EXISTS t1, t2;
2568+
CREATE TABLE t1 (a VARCHAR(20), b INT);
2569+
CREATE TABLE t2 (a VARCHAR(20), b INT);
2570+
INSERT INTO t1 VALUES ('ABC', 1);
2571+
INSERT INTO t2 VALUES ('ABC', 1);
2572+
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
2573+
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
2574+
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
2575+
secret
2576+
SELECT DECODE((SELECT ENCODE('secret', 'ABC') FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
2577+
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
2578+
DECODE((SELECT ENCODE('secret', 'ABC') FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
2579+
secret
2580+
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), 'ABC')
2581+
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
2582+
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), 'ABC')
2583+
secret
2584+
TRUNCATE TABLE t1;
2585+
TRUNCATE TABLE t2;
2586+
INSERT INTO t1 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
2587+
INSERT INTO t2 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
2588+
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
2589+
FROM t2 WHERE t2.b = 1 GROUP BY t2.b;
2590+
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
2591+
secret
2592+
DROP TABLE t1, t2;
25642593
Start of 5.4 tests
25652594
SELECT format(12345678901234567890.123, 3);
25662595
format(12345678901234567890.123, 3)

mysql-test/r/gis.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,19 @@ GEOMFROMTEXT(
984984
SELECT 1 FROM t1 WHERE a <> (SELECT GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
985985
1
986986
DROP TABLE t1;
987+
#
988+
# Bug #49250 : spatial btree index corruption and crash
989+
# Part one : spatial syntax check
990+
#
991+
CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL,
992+
SPATIAL INDEX USING BTREE (col1));
993+
ERROR 42000: 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 'USING BTREE (col1))' at line 2
994+
CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL);
995+
CREATE SPATIAL INDEX USING BTREE ON t2(col);
996+
ERROR 42000: 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 'USING BTREE ON t2(col)' at line 1
997+
ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1);
998+
ERROR 42000: 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 'USING BTREE (col1)' at line 1
999+
DROP TABLE t2;
9871000
End of 5.0 tests
9881001
create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
9891002
create view v1 as select * from t1;

0 commit comments

Comments
 (0)