Skip to content

Commit efa85aa

Browse files
author
monty@narttu.mysql.fi
committed
Move test that uses many tables (in query_cache.test) to separate test so that we can get it 'skipped' instead of 'failed' on system where we can't open many files.
1 parent 423b1b7 commit efa85aa

18 files changed

+180
-76
lines changed

client/mysqltest.c

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
4343
**********************************************************************/
4444

45-
#define MTEST_VERSION "1.27"
45+
#define MTEST_VERSION "1.28"
4646

4747
#include <my_global.h>
4848
#include <mysql_embed.h>
@@ -845,7 +845,28 @@ int var_query_set(VAR* v, const char* p, const char** p_end)
845845
}
846846

847847
if ((row = mysql_fetch_row(res)) && row[0])
848-
eval_expr(v, row[0], 0);
848+
{
849+
/*
850+
Concatenate all row results with tab in between to allow us to work
851+
with results from many columns (for example from SHOW VARIABLES)
852+
*/
853+
DYNAMIC_STRING result;
854+
uint i;
855+
ulong *lengths;
856+
char *end;
857+
858+
init_dynamic_string(&result, "", 16384, 65536);
859+
lengths= mysql_fetch_lengths(res);
860+
for (i=0; i < mysql_num_fields(res); i++)
861+
{
862+
if (row[0])
863+
dynstr_append_mem(&result, row[i], lengths[i]);
864+
dynstr_append_mem(&result, "\t", 1);
865+
}
866+
end= result.str + result.length-1;
867+
eval_expr(v, result.str, (const char**) &end);
868+
dynstr_free(&result);
869+
}
849870
else
850871
eval_expr(v, "", 0);
851872

@@ -902,8 +923,6 @@ int eval_expr(VAR* v, const char* p, const char** p_end)
902923
return 0;
903924
}
904925

905-
if (p_end)
906-
*p_end = 0;
907926
die("Invalid expr: %s", p);
908927
return 1;
909928
}
@@ -1197,7 +1216,7 @@ static char *get_string(char **to_ptr, char **from_ptr,
11971216
VAR *var=var_get(start, &end, 0, 1);
11981217
if (var && to == (char*) end+1)
11991218
{
1200-
DBUG_PRINT("info",("var: %s -> %s", start, var->str_val));
1219+
DBUG_PRINT("info",("var: '%s' -> '%s'", start, var->str_val));
12011220
DBUG_RETURN(var->str_val); /* return found variable value */
12021221
}
12031222
}

libmysql/errmsg.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ const char *client_errors[]=
2626
{
2727
"Unbekannter MySQL Fehler",
2828
"Kann UNIX-Socket nicht anlegen (%d)",
29-
"Keine Verbindung zu lokalem MySQL Server, socket: '%-.64s' (%d)",
30-
"Keine Verbindung zu MySQL Server auf %-.64s (%d)",
29+
"Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
30+
"Keine Verbindung zu MySQL Server auf %-.100s (%d)",
3131
"Kann TCP/IP-Socket nicht anlegen (%d)",
32-
"Unbekannter MySQL Server Host (%-.64s) (%d)",
32+
"Unbekannter MySQL Server Host (%-.100s) (%d)",
3333
"MySQL Server nicht vorhanden",
3434
"Protokolle ungleich. Server Version = % d Client Version = %d",
3535
"MySQL client got out of memory",
3636
"Wrong host info",
3737
"Localhost via UNIX socket",
38-
"%-.64s via TCP/IP",
38+
"%-.100s via TCP/IP",
3939
"Error in server handshake",
4040
"Lost connection to MySQL server during query",
4141
"Commands out of sync; You can't run this command now",
42-
"Verbindung ueber Named Pipe; Host: %-.64s",
42+
"Verbindung ueber Named Pipe; Host: %-.100s",
4343
"Kann nicht auf Named Pipe warten. Host: %-.64s pipe: %-.32s (%lu)",
4444
"Kann Named Pipe nicht oeffnen. Host: %-.64s pipe: %-.32s (%lu)",
4545
"Kann den Status der Named Pipe nicht setzen. Host: %-.64s pipe: %-.32s (%lu)",
46-
"Can't initialize character set %-.64s (path: %-.64s)",
46+
"Can't initialize character set %-.32s (path: %-.100s)",
4747
"Got packet bigger than 'max_allowed_packet'",
4848
"Embedded server",
4949
"Error on SHOW SLAVE STATUS:",
@@ -61,24 +61,24 @@ const char *client_errors[]=
6161
{
6262
"Erro desconhecido do MySQL",
6363
"Não pode criar 'UNIX socket' (%d)",
64-
"Não pode se conectar ao servidor MySQL local através do 'socket' '%-.64s' (%d)",
65-
"Não pode se conectar ao servidor MySQL em '%-.64s' (%d)",
64+
"Não pode se conectar ao servidor MySQL local através do 'socket' '%-.100s' (%d)",
65+
"Não pode se conectar ao servidor MySQL em '%-.100s' (%d)",
6666
"Não pode criar 'socket TCP/IP' (%d)",
67-
"'Host' servidor MySQL '%-.64s' (%d) desconhecido",
67+
"'Host' servidor MySQL '%-.100s' (%d) desconhecido",
6868
"Servidor MySQL desapareceu",
6969
"Incompatibilidade de protocolos. Versão do Servidor: %d - Versão do Cliente: %d",
7070
"Cliente do MySQL com falta de memória",
7171
"Informação inválida de 'host'",
7272
"Localhost via 'UNIX socket'",
73-
"%-.64s via 'TCP/IP'",
73+
"%-.100s via 'TCP/IP'",
7474
"Erro na negociação de acesso ao servidor",
7575
"Conexão perdida com servidor MySQL durante 'query'",
7676
"Comandos fora de sincronismo. Você não pode executar este comando agora",
77-
"%-.64s via 'named pipe'",
77+
"%-.100s via 'named pipe'",
7878
"Não pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
7979
"Não pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
8080
"Não pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
81-
"Não pode inicializar conjunto de caracteres %-.64s (caminho %-.64s)",
81+
"Não pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
8282
"Obteve pacote maior do que 'max_allowed_packet'",
8383
"Embedded server"
8484
"Error on SHOW SLAVE STATUS:",
@@ -94,24 +94,24 @@ const char *client_errors[]=
9494
{
9595
"Unknown MySQL error",
9696
"Can't create UNIX socket (%d)",
97-
"Can't connect to local MySQL server through socket '%-.64s' (%d)",
98-
"Can't connect to MySQL server on '%-.64s' (%d)",
97+
"Can't connect to local MySQL server through socket '%-.100s' (%d)",
98+
"Can't connect to MySQL server on '%-.100s' (%d)",
9999
"Can't create TCP/IP socket (%d)",
100-
"Unknown MySQL Server Host '%-.64s' (%d)",
100+
"Unknown MySQL Server Host '%-.100s' (%d)",
101101
"MySQL server has gone away",
102102
"Protocol mismatch. Server Version = %d Client Version = %d",
103103
"MySQL client run out of memory",
104104
"Wrong host info",
105105
"Localhost via UNIX socket",
106-
"%-.64s via TCP/IP",
106+
"%-.100s via TCP/IP",
107107
"Error in server handshake",
108108
"Lost connection to MySQL server during query",
109109
"Commands out of sync; You can't run this command now",
110-
"%-.64s via named pipe",
110+
"%-.100s via named pipe",
111111
"Can't wait for named pipe to host: %-.64s pipe: %-.32s (%lu)",
112112
"Can't open named pipe to host: %-.64s pipe: %-.32s (%lu)",
113113
"Can't set state of named pipe to host: %-.64s pipe: %-.32s (%lu)",
114-
"Can't initialize character set %-.64s (path: %-.64s)",
114+
"Can't initialize character set %-.32s (path: %-.100s)",
115115
"Got packet bigger than 'max_allowed_packet'",
116116
"Embedded server",
117117
"Error on SHOW SLAVE STATUS:",

libmysql/libmysql.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,16 @@ void STDCALL mysql_server_end()
110110
{
111111
/* If library called my_init(), free memory allocated by it */
112112
if (!org_my_init_done)
113+
{
113114
my_end(0);
115+
#ifndef THREAD
116+
/* Remove TRACING, if enabled by mysql_debug() */
117+
DBUG_POP();
118+
#endif
119+
}
114120
else
115121
mysql_thread_end();
122+
mysql_client_init= org_my_init_done= 0;
116123
}
117124

118125
my_bool STDCALL mysql_thread_init()
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Check that second part of $LIMIT is between $MIN_LIMIT and $MAX_LIMIT
3+
# This is useful to check that a variable from SHOW_VARIABLES is within
4+
# certain limits. Check query_cache_merge.test for an example of using this.
5+
#
6+
-- require r/check_var_limit.require
7+
disable_query_log;
8+
eval select SUBSTRING_INDEX($LIMIT, "\t", 2) BETWEEN $MIN_LIMIT AND $MAX_LIMIT as "limit";
9+
enable_query_log;

mysql-test/mysql-test-run.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ USE_MANAGER=0
1616
MY_TZ=GMT-3
1717
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
1818

19+
# For query_cache test
20+
ulimit -n 1024
21+
1922
#++
2023
# Program Definitions
2124
#--
@@ -829,7 +832,6 @@ start_master()
829832
/bin/sh $master_init_script
830833
fi
831834
cd $BASEDIR # for gcov
832-
#start master
833835
if [ -z "$DO_BENCH" ]
834836
then
835837
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin \
@@ -848,6 +850,7 @@ start_master()
848850
--tmpdir=$MYSQL_TMP_DIR \
849851
--language=$LANGUAGE \
850852
--innodb_data_file_path=ibdata1:50M \
853+
--open-files-limit=1024 \
851854
$MASTER_40_ARGS \
852855
$SMALL_SERVER \
853856
$EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT"
@@ -1363,6 +1366,9 @@ fi
13631366

13641367
$ECHO "Starting Tests"
13651368

1369+
#
1370+
# This can probably be deleted
1371+
#
13661372
if [ "$DO_BENCH" = 1 ]
13671373
then
13681374
BENCHDIR=$BASEDIR/sql-bench/

mysql-test/r/check_var_limit.require

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
limit
2+
1

mysql-test/r/loaddata.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ NULL NULL 0000-00-00 0000-00-00
1616
NULL 0000-00-00 0000-00-00 0000-00-00
1717
NULL 2003-03-03 2003-03-03 NULL
1818
drop table t1;
19+
create table t1 (a text, b text);
20+
load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
21+
select concat('|',a,'|'), concat('|',b,'|') from t1;
22+
concat('|',a,'|') concat('|',b,'|')
23+
|Field A| |Field B|
24+
|Field 1| |Field 2'
25+
Field 3,'Field 4|
26+
|Field 5' ,'Field 6| NULL
27+
|Field 6| | 'Field 7'|
28+
drop table t1;

mysql-test/r/query_cache.result

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ flush query cache;
22
flush query cache;
33
reset query cache;
44
flush status;
5-
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00,mysqltest.t1;
5+
drop table if exists t1,t2,t3;
66
drop database if exists mysqltest;
77
create table t1 (a int not null);
88
insert into t1 values (1),(2),(3);
@@ -640,21 +640,3 @@ Variable_name Value
640640
Qcache_queries_in_cache 2
641641
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
642642
drop table t1;
643-
flush status;
644-
select count(*) from t00;
645-
count(*)
646-
514
647-
select count(*) from t00;
648-
count(*)
649-
514
650-
show status like "Qcache_queries_in_cache";
651-
Variable_name Value
652-
Qcache_queries_in_cache 1
653-
show status like "Qcache_hits";
654-
Variable_name Value
655-
Qcache_hits 1
656-
delete from t256;
657-
show status like "Qcache_queries_in_cache";
658-
Variable_name Value
659-
Qcache_queries_in_cache 0
660-
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;

mysql-test/r/query_cache_merge.result

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
SET @@global.query_cache_size=1355776;
2+
flush status;
3+
select count(*) from t00;
4+
count(*)
5+
514
6+
select count(*) from t00;
7+
count(*)
8+
514
9+
show status like "Qcache_queries_in_cache";
10+
Variable_name Value
11+
Qcache_queries_in_cache 1
12+
show status like "Qcache_hits";
13+
Variable_name Value
14+
Qcache_hits 1
15+
delete from t256;
16+
show status like "Qcache_queries_in_cache";
17+
Variable_name Value
18+
Qcache_queries_in_cache 0
19+
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;
20+
SET @@global.query_cache_size=0;

mysql-test/r/select_safe.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ analyze table t1;
6767
Table Op Msg_type Msg_text
6868
test.t1 analyze status OK
6969
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
70-
explain select * from t1,t1 as t2 where t1.b=t2.b;
70+
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
7171
table type possible_keys key key_len ref rows Extra
7272
t1 ALL b NULL NULL NULL 21
7373
t2 ALL b NULL NULL NULL 16 Using where
7474
set MAX_SEEKS_FOR_KEY=1;
75-
explain select * from t1,t1 as t2 where t1.b=t2.b;
75+
explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
7676
table type possible_keys key key_len ref rows Extra
7777
t1 ALL b NULL NULL NULL 21
7878
t2 ref b b 21 t1.b 6 Using where

mysql-test/std_data/loaddata2.dat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Field A,'Field B'
2+
Field 1,'Field 2'
3+
Field 3,'Field 4'
4+
'Field 5' ,'Field 6'
5+
Field 6, 'Field 7'

mysql-test/t/loaddata.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated
1414
SELECT * from t1;
1515
drop table t1;
1616

17-
18-
19-
17+
create table t1 (a text, b text);
18+
load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
19+
select concat('|',a,'|'), concat('|',b,'|') from t1;
20+
drop table t1;

mysql-test/t/query_cache.test

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ flush query cache; # This crashed in some versions
1010
flush query cache; # This crashed in some versions
1111
reset query cache;
1212
flush status;
13-
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00,mysqltest.t1;
13+
drop table if exists t1,t2,t3;
1414
drop database if exists mysqltest;
1515

1616
#
@@ -450,25 +450,3 @@ select * from t1;
450450
show status like "Qcache_queries_in_cache";
451451
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
452452
drop table t1;
453-
454-
#
455-
# more then 255 (257) merged tables test
456-
#
457-
flush status;
458-
disable_query_log;
459-
let $1 = 257;
460-
while ($1)
461-
{
462-
eval create table t$1(a int);
463-
eval insert into t$1 values (1),(2);
464-
dec $1;
465-
}
466-
create table t00 (a int) type=MERGE UNION=(t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257) INSERT_METHOD=FIRST;
467-
enable_query_log;
468-
select count(*) from t00;
469-
select count(*) from t00;
470-
show status like "Qcache_queries_in_cache";
471-
show status like "Qcache_hits";
472-
delete from t256;
473-
show status like "Qcache_queries_in_cache";
474-
drop table t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39,t40,t41,t42,t43,t44,t45,t46,t47,t48,t49,t50,t51,t52,t53,t54,t55,t56,t57,t58,t59,t60,t61,t62,t63,t64,t65,t66,t67,t68,t69,t70,t71,t72,t73,t74,t75,t76,t77,t78,t79,t80,t81,t82,t83,t84,t85,t86,t87,t88,t89,t90,t91,t92,t93,t94,t95,t96,t97,t98,t99,t100,t101,t102,t103,t104,t105,t106,t107,t108,t109,t110,t111,t112,t113,t114,t115,t116,t117,t118,t119,t120,t121,t122,t123,t124,t125,t126,t127,t128,t129,t130,t131,t132,t133,t134,t135,t136,t137,t138,t139,t140,t141,t142,t143,t144,t145,t146,t147,t148,t149,t150,t151,t152,t153,t154,t155,t156,t157,t158,t159,t160,t161,t162,t163,t164,t165,t166,t167,t168,t169,t170,t171,t172,t173,t174,t175,t176,t177,t178,t179,t180,t181,t182,t183,t184,t185,t186,t187,t188,t189,t190,t191,t192,t193,t194,t195,t196,t197,t198,t199,t200,t201,t202,t203,t204,t205,t206,t207,t208,t209,t210,t211,t212,t213,t214,t215,t216,t217,t218,t219,t220,t221,t222,t223,t224,t225,t226,t227,t228,t229,t230,t231,t232,t233,t234,t235,t236,t237,t238,t239,t240,t241,t242,t243,t244,t245,t246,t247,t248,t249,t250,t251,t252,t253,t254,t255,t256,t257,t00;

0 commit comments

Comments
 (0)