Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
31fa2c50
Commit
31fa2c50
authored
Nov 13, 2002
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
merged
parents
a69c61a0
5563f67c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
293 additions
and
22 deletions
+293
-22
BitKeeper/etc/gone
BitKeeper/etc/gone
+38
-0
client/mysqlcheck.c
client/mysqlcheck.c
+23
-10
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+222
-10
sql/ha_myisam.cc
sql/ha_myisam.cc
+10
-2
No files found.
BitKeeper/etc/gone
View file @
31fa2c50
...
...
@@ -199,7 +199,9 @@ BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb
BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8
BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133
BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a
BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49
BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b
BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7
BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc
BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f
BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9
...
...
@@ -263,7 +265,9 @@ BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd6
BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406
BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe
BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d
BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df
BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b
BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f
BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435
BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42
BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9
...
...
@@ -273,7 +277,9 @@ BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|0207
BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186
BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b
BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf
BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec
BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890
BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3
BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd
BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86
BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b
...
...
@@ -283,7 +289,9 @@ BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106
BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d
BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a
BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b
BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79
BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e
BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe
BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4
BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698
BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684
...
...
@@ -293,7 +301,9 @@ BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0
BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec
BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f
BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618
BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1
BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f
BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e
BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6
BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c
BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6
...
...
@@ -303,7 +313,9 @@ BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|515
BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76
BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9
BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef
BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b
BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f
BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498
BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587
BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e
BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81
...
...
@@ -313,7 +325,9 @@ BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd0
BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51
BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31
BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298
BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79
BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19
BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9
BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07
BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961
BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d
...
...
@@ -323,7 +337,9 @@ BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3
BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d
BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096
BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f
BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268
BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d
BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a
BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a
BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d
BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4
...
...
@@ -333,7 +349,9 @@ BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290|
BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b
BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8
BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801
BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378
BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8
BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad
BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66
BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a
BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990
...
...
@@ -652,6 +670,7 @@ mwagner@evoq.home.mwagner.org|Docs/Books/prof.eps|20001231203220|15779|dc69b0395
mwagner@evoq.home.mwagner.org|Docs/Books/pthreads.eps|20001231203220|18899|d60ad51891ef4c49
mwagner@evoq.home.mwagner.org|Docs/Books/realmen.eps|20001231203220|22075|1ceb4839e835dad4
mwagner@evoq.home.mwagner.org|Docs/Books/sql-99.eps|20001231203220|25230|cec4ae16fee4c640
mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876
mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768
mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.tst|20001013104933|54568|2e626fa07144d2c8
mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a
...
...
@@ -726,6 +745,8 @@ mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713|
mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9
mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10
mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634
mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86
mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc
nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141
nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6
sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554
...
...
@@ -733,19 +754,36 @@ sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97
sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618
sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5
sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5
sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9
sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f
sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5
sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27
sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d
sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503
sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e
sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f
sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a
sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18
sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c
sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5
...
...
client/mysqlcheck.c
View file @
31fa2c50
...
...
@@ -352,21 +352,25 @@ static int process_selected_tables(char *db, char **table_names, int tables)
return
1
;
if
(
opt_all_in_1
)
{
/*
We need table list in form `a`, `b`, `c`
that's why we need 4 more chars added to to each table name
space is for more readable output in logs and in case of error
*/
char
*
table_names_comma_sep
,
*
end
;
int
i
,
tot_length
=
0
;
for
(
i
=
0
;
i
<
tables
;
i
++
)
tot_length
+=
strlen
(
*
(
table_names
+
i
))
+
1
;
tot_length
+=
strlen
(
*
(
table_names
+
i
))
+
4
;
if
(
!
(
table_names_comma_sep
=
(
char
*
)
my_malloc
((
sizeof
(
char
)
*
tot_length
)
+
1
,
MYF
(
MY_WME
))))
my_malloc
((
sizeof
(
char
)
*
tot_length
)
+
4
,
MYF
(
MY_WME
))))
return
1
;
for
(
end
=
table_names_comma_sep
+
1
;
tables
>
0
;
tables
--
,
table_names
++
)
{
end
=
strmov
(
end
,
*
table_names
);
*
end
++=
','
;
end
=
strxmov
(
end
,
" `"
,
*
table_names
,
"`,"
,
NullS
);
}
*--
end
=
0
;
handle_request_for_tables
(
table_names_comma_sep
+
1
,
tot_length
-
1
);
...
...
@@ -393,22 +397,27 @@ static int process_all_tables_in_db(char *database)
if
(
opt_all_in_1
)
{
/*
We need table list in form `a`, `b`, `c`
that's why we need 4 more chars added to to each table name
space is for more readable output in logs and in case of error
*/
char
*
tables
,
*
end
;
uint
tot_length
=
0
;
while
((
row
=
mysql_fetch_row
(
res
)))
tot_length
+=
strlen
(
row
[
0
])
+
1
;
tot_length
+=
strlen
(
row
[
0
])
+
4
;
mysql_data_seek
(
res
,
0
);
if
(
!
(
tables
=
(
char
*
)
my_malloc
(
sizeof
(
char
)
*
tot_length
+
1
,
MYF
(
MY_WME
))))
if
(
!
(
tables
=
(
char
*
)
my_malloc
(
sizeof
(
char
)
*
tot_length
+
4
,
MYF
(
MY_WME
))))
{
mysql_free_result
(
res
);
return
1
;
}
for
(
end
=
tables
+
1
;
(
row
=
mysql_fetch_row
(
res
))
;)
{
end
=
strmov
(
end
,
row
[
0
]);
*
end
++=
','
;
end
=
strxmov
(
end
,
" `"
,
row
[
0
],
"`,"
,
NullS
);
}
*--
end
=
0
;
if
(
tot_length
)
...
...
@@ -468,10 +477,14 @@ static int handle_request_for_tables(char *tables, uint length)
if
(
!
(
query
=
(
char
*
)
my_malloc
((
sizeof
(
char
)
*
(
length
+
110
)),
MYF
(
MY_WME
))))
return
1
;
sprintf
(
query
,
"%s TABLE %s %s"
,
op
,
tables
,
options
);
if
(
opt_all_in_1
)
/* No backticks here as we added them before */
sprintf
(
query
,
"%s TABLE %s %s"
,
op
,
tables
,
options
);
else
sprintf
(
query
,
"%s TABLE `%s` %s"
,
op
,
tables
,
options
);
if
(
mysql_query
(
sock
,
query
))
{
sprintf
(
message
,
"when executing '%s TABLE
`%s` %s"
,
op
,
tables
,
options
);
sprintf
(
message
,
"when executing '%s TABLE
... %s'"
,
op
,
options
);
DBerror
(
sock
,
message
);
return
1
;
}
...
...
mysql-test/t/myisam.test
View file @
31fa2c50
...
...
@@ -67,6 +67,227 @@ explain select a,b from t1;
explain
select
a
,
b
,
c
from
t1
;
drop
table
t1
;
#
# Test of OPTIMIZE of locked and modified tables
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
);
LOCK
TABLES
t1
WRITE
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
);
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
#
# Test of optimize, when only mi_sort_index (but not mi_repair*) is done
# in ha_myisam::repair, and index size is changed (decreased).
#
drop
table
if
exists
t1
;
create
table
t1
(
t1
char
(
255
),
key
(
t1
(
250
)));
insert
t1
values
(
'137513751375137513751375137513751375137569516951695169516951695169516951695169'
);
insert
t1
values
(
'178417841784178417841784178417841784178403420342034203420342034203420342034203'
);
insert
t1
values
(
'213872387238723872387238723872387238723867376737673767376737673767376737673767'
);
insert
t1
values
(
'242624262426242624262426242624262426242607890789078907890789078907890789078907'
);
insert
t1
values
(
'256025602560256025602560256025602560256011701170117011701170117011701170117011'
);
insert
t1
values
(
'276027602760276027602760276027602760276001610161016101610161016101610161016101'
);
insert
t1
values
(
'281528152815281528152815281528152815281564956495649564956495649564956495649564'
);
insert
t1
values
(
'292129212921292129212921292129212921292102100210021002100210021002100210021002'
);
insert
t1
values
(
'380638063806380638063806380638063806380634483448344834483448344834483448344834'
);
insert
t1
values
(
'411641164116411641164116411641164116411616301630163016301630163016301630163016'
);
insert
t1
values
(
'420842084208420842084208420842084208420899889988998899889988998899889988998899'
);
insert
t1
values
(
'438443844384438443844384438443844384438482448244824482448244824482448244824482'
);
insert
t1
values
(
'443244324432443244324432443244324432443239613961396139613961396139613961396139'
);
insert
t1
values
(
'485448544854485448544854485448544854485477847784778477847784778477847784778477'
);
insert
t1
values
(
'494549454945494549454945494549454945494555275527552755275527552755275527552755'
);
insert
t1
values
(
'538647864786478647864786478647864786478688918891889188918891889188918891889188'
);
insert
t1
values
(
'565556555655565556555655565556555655565554845484548454845484548454845484548454'
);
insert
t1
values
(
'607860786078607860786078607860786078607856665666566656665666566656665666566656'
);
insert
t1
values
(
'640164016401640164016401640164016401640141274127412741274127412741274127412741'
);
insert
t1
values
(
'719471947194719471947194719471947194719478717871787178717871787178717871787178'
);
insert
t1
values
(
'742574257425742574257425742574257425742549604960496049604960496049604960496049'
);
insert
t1
values
(
'887088708870887088708870887088708870887035963596359635963596359635963596359635'
);
insert
t1
values
(
'917791779177917791779177917791779177917773857385738573857385738573857385738573'
);
insert
t1
values
(
'933293329332933293329332933293329332933278987898789878987898789878987898789878'
);
insert
t1
values
(
'963896389638963896389638963896389638963877807780778077807780778077807780778077'
);
delete
from
t1
where
t1
>
'2'
;
insert
t1
values
(
'70'
),
(
'84'
),
(
'60'
),
(
'20'
),
(
'76'
),
(
'89'
),
(
'49'
),
(
'50'
),
(
'88'
),
(
'61'
),
(
'42'
),
(
'98'
),
(
'39'
),
(
'30'
),
(
'25'
),
(
'66'
),
(
'61'
),
(
'48'
),
(
'80'
),
(
'84'
),
(
'98'
),
(
'19'
),
(
'91'
),
(
'42'
),
(
'47'
);
optimize
table
t1
;
check
table
t1
;
drop
table
t1
;
#
# test of myisam with huge number of packed fields
#
drop
table
if
exists
t1
;
create
table
t1
(
i1
int
,
i2
int
,
i3
int
,
i4
int
,
i5
int
,
i6
int
,
i7
int
,
i8
int
,
i9
int
,
i10
int
,
i11
int
,
i12
int
,
i13
int
,
i14
int
,
i15
int
,
i16
int
,
i17
int
,
i18
int
,
i19
int
,
i20
int
,
i21
int
,
i22
int
,
i23
int
,
i24
int
,
i25
int
,
i26
int
,
i27
int
,
i28
int
,
i29
int
,
i30
int
,
i31
int
,
i32
int
,
i33
int
,
i34
int
,
i35
int
,
i36
int
,
i37
int
,
i38
int
,
i39
int
,
i40
int
,
i41
int
,
i42
int
,
i43
int
,
i44
int
,
i45
int
,
i46
int
,
i47
int
,
i48
int
,
i49
int
,
i50
int
,
i51
int
,
i52
int
,
i53
int
,
i54
int
,
i55
int
,
i56
int
,
i57
int
,
i58
int
,
i59
int
,
i60
int
,
i61
int
,
i62
int
,
i63
int
,
i64
int
,
i65
int
,
i66
int
,
i67
int
,
i68
int
,
i69
int
,
i70
int
,
i71
int
,
i72
int
,
i73
int
,
i74
int
,
i75
int
,
i76
int
,
i77
int
,
i78
int
,
i79
int
,
i80
int
,
i81
int
,
i82
int
,
i83
int
,
i84
int
,
i85
int
,
i86
int
,
i87
int
,
i88
int
,
i89
int
,
i90
int
,
i91
int
,
i92
int
,
i93
int
,
i94
int
,
i95
int
,
i96
int
,
i97
int
,
i98
int
,
i99
int
,
i100
int
,
i101
int
,
i102
int
,
i103
int
,
i104
int
,
i105
int
,
i106
int
,
i107
int
,
i108
int
,
i109
int
,
i110
int
,
i111
int
,
i112
int
,
i113
int
,
i114
int
,
i115
int
,
i116
int
,
i117
int
,
i118
int
,
i119
int
,
i120
int
,
i121
int
,
i122
int
,
i123
int
,
i124
int
,
i125
int
,
i126
int
,
i127
int
,
i128
int
,
i129
int
,
i130
int
,
i131
int
,
i132
int
,
i133
int
,
i134
int
,
i135
int
,
i136
int
,
i137
int
,
i138
int
,
i139
int
,
i140
int
,
i141
int
,
i142
int
,
i143
int
,
i144
int
,
i145
int
,
i146
int
,
i147
int
,
i148
int
,
i149
int
,
i150
int
,
i151
int
,
i152
int
,
i153
int
,
i154
int
,
i155
int
,
i156
int
,
i157
int
,
i158
int
,
i159
int
,
i160
int
,
i161
int
,
i162
int
,
i163
int
,
i164
int
,
i165
int
,
i166
int
,
i167
int
,
i168
int
,
i169
int
,
i170
int
,
i171
int
,
i172
int
,
i173
int
,
i174
int
,
i175
int
,
i176
int
,
i177
int
,
i178
int
,
i179
int
,
i180
int
,
i181
int
,
i182
int
,
i183
int
,
i184
int
,
i185
int
,
i186
int
,
i187
int
,
i188
int
,
i189
int
,
i190
int
,
i191
int
,
i192
int
,
i193
int
,
i194
int
,
i195
int
,
i196
int
,
i197
int
,
i198
int
,
i199
int
,
i200
int
,
i201
int
,
i202
int
,
i203
int
,
i204
int
,
i205
int
,
i206
int
,
i207
int
,
i208
int
,
i209
int
,
i210
int
,
i211
int
,
i212
int
,
i213
int
,
i214
int
,
i215
int
,
i216
int
,
i217
int
,
i218
int
,
i219
int
,
i220
int
,
i221
int
,
i222
int
,
i223
int
,
i224
int
,
i225
int
,
i226
int
,
i227
int
,
i228
int
,
i229
int
,
i230
int
,
i231
int
,
i232
int
,
i233
int
,
i234
int
,
i235
int
,
i236
int
,
i237
int
,
i238
int
,
i239
int
,
i240
int
,
i241
int
,
i242
int
,
i243
int
,
i244
int
,
i245
int
,
i246
int
,
i247
int
,
i248
int
,
i249
int
,
i250
int
,
i251
int
,
i252
int
,
i253
int
,
i254
int
,
i255
int
,
i256
int
,
i257
int
,
i258
int
,
i259
int
,
i260
int
,
i261
int
,
i262
int
,
i263
int
,
i264
int
,
i265
int
,
i266
int
,
i267
int
,
i268
int
,
i269
int
,
i270
int
,
i271
int
,
i272
int
,
i273
int
,
i274
int
,
i275
int
,
i276
int
,
i277
int
,
i278
int
,
i279
int
,
i280
int
,
i281
int
,
i282
int
,
i283
int
,
i284
int
,
i285
int
,
i286
int
,
i287
int
,
i288
int
,
i289
int
,
i290
int
,
i291
int
,
i292
int
,
i293
int
,
i294
int
,
i295
int
,
i296
int
,
i297
int
,
i298
int
,
i299
int
,
i300
int
,
i301
int
,
i302
int
,
i303
int
,
i304
int
,
i305
int
,
i306
int
,
i307
int
,
i308
int
,
i309
int
,
i310
int
,
i311
int
,
i312
int
,
i313
int
,
i314
int
,
i315
int
,
i316
int
,
i317
int
,
i318
int
,
i319
int
,
i320
int
,
i321
int
,
i322
int
,
i323
int
,
i324
int
,
i325
int
,
i326
int
,
i327
int
,
i328
int
,
i329
int
,
i330
int
,
i331
int
,
i332
int
,
i333
int
,
i334
int
,
i335
int
,
i336
int
,
i337
int
,
i338
int
,
i339
int
,
i340
int
,
i341
int
,
i342
int
,
i343
int
,
i344
int
,
i345
int
,
i346
int
,
i347
int
,
i348
int
,
i349
int
,
i350
int
,
i351
int
,
i352
int
,
i353
int
,
i354
int
,
i355
int
,
i356
int
,
i357
int
,
i358
int
,
i359
int
,
i360
int
,
i361
int
,
i362
int
,
i363
int
,
i364
int
,
i365
int
,
i366
int
,
i367
int
,
i368
int
,
i369
int
,
i370
int
,
i371
int
,
i372
int
,
i373
int
,
i374
int
,
i375
int
,
i376
int
,
i377
int
,
i378
int
,
i379
int
,
i380
int
,
i381
int
,
i382
int
,
i383
int
,
i384
int
,
i385
int
,
i386
int
,
i387
int
,
i388
int
,
i389
int
,
i390
int
,
i391
int
,
i392
int
,
i393
int
,
i394
int
,
i395
int
,
i396
int
,
i397
int
,
i398
int
,
i399
int
,
i400
int
,
i401
int
,
i402
int
,
i403
int
,
i404
int
,
i405
int
,
i406
int
,
i407
int
,
i408
int
,
i409
int
,
i410
int
,
i411
int
,
i412
int
,
i413
int
,
i414
int
,
i415
int
,
i416
int
,
i417
int
,
i418
int
,
i419
int
,
i420
int
,
i421
int
,
i422
int
,
i423
int
,
i424
int
,
i425
int
,
i426
int
,
i427
int
,
i428
int
,
i429
int
,
i430
int
,
i431
int
,
i432
int
,
i433
int
,
i434
int
,
i435
int
,
i436
int
,
i437
int
,
i438
int
,
i439
int
,
i440
int
,
i441
int
,
i442
int
,
i443
int
,
i444
int
,
i445
int
,
i446
int
,
i447
int
,
i448
int
,
i449
int
,
i450
int
,
i451
int
,
i452
int
,
i453
int
,
i454
int
,
i455
int
,
i456
int
,
i457
int
,
i458
int
,
i459
int
,
i460
int
,
i461
int
,
i462
int
,
i463
int
,
i464
int
,
i465
int
,
i466
int
,
i467
int
,
i468
int
,
i469
int
,
i470
int
,
i471
int
,
i472
int
,
i473
int
,
i474
int
,
i475
int
,
i476
int
,
i477
int
,
i478
int
,
i479
int
,
i480
int
,
i481
int
,
i482
int
,
i483
int
,
i484
int
,
i485
int
,
i486
int
,
i487
int
,
i488
int
,
i489
int
,
i490
int
,
i491
int
,
i492
int
,
i493
int
,
i494
int
,
i495
int
,
i496
int
,
i497
int
,
i498
int
,
i499
int
,
i500
int
,
i501
int
,
i502
int
,
i503
int
,
i504
int
,
i505
int
,
i506
int
,
i507
int
,
i508
int
,
i509
int
,
i510
int
,
i511
int
,
i512
int
,
i513
int
,
i514
int
,
i515
int
,
i516
int
,
i517
int
,
i518
int
,
i519
int
,
i520
int
,
i521
int
,
i522
int
,
i523
int
,
i524
int
,
i525
int
,
i526
int
,
i527
int
,
i528
int
,
i529
int
,
i530
int
,
i531
int
,
i532
int
,
i533
int
,
i534
int
,
i535
int
,
i536
int
,
i537
int
,
i538
int
,
i539
int
,
i540
int
,
i541
int
,
i542
int
,
i543
int
,
i544
int
,
i545
int
,
i546
int
,
i547
int
,
i548
int
,
i549
int
,
i550
int
,
i551
int
,
i552
int
,
i553
int
,
i554
int
,
i555
int
,
i556
int
,
i557
int
,
i558
int
,
i559
int
,
i560
int
,
i561
int
,
i562
int
,
i563
int
,
i564
int
,
i565
int
,
i566
int
,
i567
int
,
i568
int
,
i569
int
,
i570
int
,
i571
int
,
i572
int
,
i573
int
,
i574
int
,
i575
int
,
i576
int
,
i577
int
,
i578
int
,
i579
int
,
i580
int
,
i581
int
,
i582
int
,
i583
int
,
i584
int
,
i585
int
,
i586
int
,
i587
int
,
i588
int
,
i589
int
,
i590
int
,
i591
int
,
i592
int
,
i593
int
,
i594
int
,
i595
int
,
i596
int
,
i597
int
,
i598
int
,
i599
int
,
i600
int
,
i601
int
,
i602
int
,
i603
int
,
i604
int
,
i605
int
,
i606
int
,
i607
int
,
i608
int
,
i609
int
,
i610
int
,
i611
int
,
i612
int
,
i613
int
,
i614
int
,
i615
int
,
i616
int
,
i617
int
,
i618
int
,
i619
int
,
i620
int
,
i621
int
,
i622
int
,
i623
int
,
i624
int
,
i625
int
,
i626
int
,
i627
int
,
i628
int
,
i629
int
,
i630
int
,
i631
int
,
i632
int
,
i633
int
,
i634
int
,
i635
int
,
i636
int
,
i637
int
,
i638
int
,
i639
int
,
i640
int
,
i641
int
,
i642
int
,
i643
int
,
i644
int
,
i645
int
,
i646
int
,
i647
int
,
i648
int
,
i649
int
,
i650
int
,
i651
int
,
i652
int
,
i653
int
,
i654
int
,
i655
int
,
i656
int
,
i657
int
,
i658
int
,
i659
int
,
i660
int
,
i661
int
,
i662
int
,
i663
int
,
i664
int
,
i665
int
,
i666
int
,
i667
int
,
i668
int
,
i669
int
,
i670
int
,
i671
int
,
i672
int
,
i673
int
,
i674
int
,
i675
int
,
i676
int
,
i677
int
,
i678
int
,
i679
int
,
i680
int
,
i681
int
,
i682
int
,
i683
int
,
i684
int
,
i685
int
,
i686
int
,
i687
int
,
i688
int
,
i689
int
,
i690
int
,
i691
int
,
i692
int
,
i693
int
,
i694
int
,
i695
int
,
i696
int
,
i697
int
,
i698
int
,
i699
int
,
i700
int
,
i701
int
,
i702
int
,
i703
int
,
i704
int
,
i705
int
,
i706
int
,
i707
int
,
i708
int
,
i709
int
,
i710
int
,
i711
int
,
i712
int
,
i713
int
,
i714
int
,
i715
int
,
i716
int
,
i717
int
,
i718
int
,
i719
int
,
i720
int
,
i721
int
,
i722
int
,
i723
int
,
i724
int
,
i725
int
,
i726
int
,
i727
int
,
i728
int
,
i729
int
,
i730
int
,
i731
int
,
i732
int
,
i733
int
,
i734
int
,
i735
int
,
i736
int
,
i737
int
,
i738
int
,
i739
int
,
i740
int
,
i741
int
,
i742
int
,
i743
int
,
i744
int
,
i745
int
,
i746
int
,
i747
int
,
i748
int
,
i749
int
,
i750
int
,
i751
int
,
i752
int
,
i753
int
,
i754
int
,
i755
int
,
i756
int
,
i757
int
,
i758
int
,
i759
int
,
i760
int
,
i761
int
,
i762
int
,
i763
int
,
i764
int
,
i765
int
,
i766
int
,
i767
int
,
i768
int
,
i769
int
,
i770
int
,
i771
int
,
i772
int
,
i773
int
,
i774
int
,
i775
int
,
i776
int
,
i777
int
,
i778
int
,
i779
int
,
i780
int
,
i781
int
,
i782
int
,
i783
int
,
i784
int
,
i785
int
,
i786
int
,
i787
int
,
i788
int
,
i789
int
,
i790
int
,
i791
int
,
i792
int
,
i793
int
,
i794
int
,
i795
int
,
i796
int
,
i797
int
,
i798
int
,
i799
int
,
i800
int
,
i801
int
,
i802
int
,
i803
int
,
i804
int
,
i805
int
,
i806
int
,
i807
int
,
i808
int
,
i809
int
,
i810
int
,
i811
int
,
i812
int
,
i813
int
,
i814
int
,
i815
int
,
i816
int
,
i817
int
,
i818
int
,
i819
int
,
i820
int
,
i821
int
,
i822
int
,
i823
int
,
i824
int
,
i825
int
,
i826
int
,
i827
int
,
i828
int
,
i829
int
,
i830
int
,
i831
int
,
i832
int
,
i833
int
,
i834
int
,
i835
int
,
i836
int
,
i837
int
,
i838
int
,
i839
int
,
i840
int
,
i841
int
,
i842
int
,
i843
int
,
i844
int
,
i845
int
,
i846
int
,
i847
int
,
i848
int
,
i849
int
,
i850
int
,
i851
int
,
i852
int
,
i853
int
,
i854
int
,
i855
int
,
i856
int
,
i857
int
,
i858
int
,
i859
int
,
i860
int
,
i861
int
,
i862
int
,
i863
int
,
i864
int
,
i865
int
,
i866
int
,
i867
int
,
i868
int
,
i869
int
,
i870
int
,
i871
int
,
i872
int
,
i873
int
,
i874
int
,
i875
int
,
i876
int
,
i877
int
,
i878
int
,
i879
int
,
i880
int
,
i881
int
,
i882
int
,
i883
int
,
i884
int
,
i885
int
,
i886
int
,
i887
int
,
i888
int
,
i889
int
,
i890
int
,
i891
int
,
i892
int
,
i893
int
,
i894
int
,
i895
int
,
i896
int
,
i897
int
,
i898
int
,
i899
int
,
i900
int
,
i901
int
,
i902
int
,
i903
int
,
i904
int
,
i905
int
,
i906
int
,
i907
int
,
i908
int
,
i909
int
,
i910
int
,
i911
int
,
i912
int
,
i913
int
,
i914
int
,
i915
int
,
i916
int
,
i917
int
,
i918
int
,
i919
int
,
i920
int
,
i921
int
,
i922
int
,
i923
int
,
i924
int
,
i925
int
,
i926
int
,
i927
int
,
i928
int
,
i929
int
,
i930
int
,
i931
int
,
i932
int
,
i933
int
,
i934
int
,
i935
int
,
i936
int
,
i937
int
,
i938
int
,
i939
int
,
i940
int
,
i941
int
,
i942
int
,
i943
int
,
i944
int
,
i945
int
,
i946
int
,
i947
int
,
i948
int
,
i949
int
,
i950
int
,
i951
int
,
i952
int
,
i953
int
,
i954
int
,
i955
int
,
i956
int
,
i957
int
,
i958
int
,
i959
int
,
i960
int
,
i961
int
,
i962
int
,
i963
int
,
i964
int
,
i965
int
,
i966
int
,
i967
int
,
i968
int
,
i969
int
,
i970
int
,
i971
int
,
i972
int
,
i973
int
,
i974
int
,
i975
int
,
i976
int
,
i977
int
,
i978
int
,
i979
int
,
i980
int
,
i981
int
,
i982
int
,
i983
int
,
i984
int
,
i985
int
,
i986
int
,
i987
int
,
i988
int
,
i989
int
,
i990
int
,
i991
int
,
i992
int
,
i993
int
,
i994
int
,
i995
int
,
i996
int
,
i997
int
,
i998
int
,
i999
int
,
i1000
int
)
row_format
=
dynamic
;
insert
into
t1
values
(
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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
,
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
,
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
,
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
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
);
drop
table
if
exists
t1
;
#
# Test of REPAIR that once failed
#
...
...
@@ -94,16 +315,6 @@ REPAIR TABLE t1;
CHECK
TABLE
t1
;
drop
table
t1
;
#
# Test of OPTIMIZE of locked and modified tables
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
);
LOCK
TABLES
t1
WRITE
;
INSERT
INTO
t1
VALUES
(
1
),
(
2
),
(
3
);
OPTIMIZE
TABLE
t1
;
DROP
TABLE
t1
;
#
# Test of creating table with too long key
#
...
...
@@ -114,3 +325,4 @@ CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
--
error
1071
ALTER
TABLE
t1
ADD
INDEX
t1
(
a
,
b
,
c
);
DROP
TABLE
t1
;
sql/ha_myisam.cc
View file @
31fa2c50
...
...
@@ -566,7 +566,6 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
}
if
(
!
optimize
||
memcmp
(
file
->
state
,
&
share
->
state
.
state
,
sizeof
(
MI_STATUS_INFO
))
||
((
file
->
state
->
del
||
share
->
state
.
split
!=
file
->
state
->
records
)
&&
(
!
(
param
.
testflag
&
T_QUICK
)
||
!
(
share
->
state
.
changed
&
STATE_NOT_OPTIMIZED_KEYS
))))
...
...
@@ -625,7 +624,16 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
STATE_CRASHED_ON_REPAIR
);
file
->
update
|=
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
;
}
file
->
save_state
=
file
->
s
->
state
.
state
;
/* Here we need to make file->save_state and file->s->state.state
equal. Unfortunately, sometime table comes locked here (so
file->save_state represents actual table state), and sometime
unlocked (and actual is file->s->state.state instead). This all
is very confusing, and should be streamlined (TODO).
*/
if
(
file
->
state
==
&
file
->
save_state
)
file
->
s
->
state
.
state
=
file
->
save_state
;
else
file
->
save_state
=
file
->
s
->
state
.
state
;
if
(
file
->
s
->
base
.
auto_key
)
update_auto_increment_key
(
&
param
,
file
,
1
);
if
(
optimize_done
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment