mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
After merge fixes
config/ac-macros/character_sets.m4: Added latin1_spanish_ci dbug/dbug_analyze.c: Remove compiler warnings include/my_handler.h: Reorder structure arguments to be more optimal innobase/dict/dict0load.c: Fixed wrong define tag (for MySQL 5.0) innobase/fil/fil0fil.c: Fixed compiler warning innobase/os/os0file.c: Fixed compiler warning myisam/ft_boolean_search.c: Fixed compiler warning myisam/ft_static.c: Update to use new HA_KEYSEG structure myisam/mi_open.c: Simple optimization myisammrg/myrg_static.c: Removed compiler warning mysql-test/r/grant.result: Update results after merge mysql-test/r/index_merge.result: Update results after merge mysql-test/r/information_schema_inno.result: Add missing drop table mysql-test/r/lowercase_table.result: safety fix mysql-test/r/multi_update.result: safety fix mysql-test/r/ps_1general.result: safety fix mysql-test/r/ps_2myisam.result: Update results after merge (set is not anymore of binary type) mysql-test/r/ps_3innodb.result: Update results after merge mysql-test/r/ps_4heap.result: Update results after merge mysql-test/r/ps_5merge.result: Update results after merge mysql-test/r/ps_6bdb.result: Update results after merge mysql-test/r/show_check.result: Update results after merge mysql-test/r/subselect.result: Update results after merge (added missing quotes) mysql-test/r/timezone2.result: Update results after merge mysql-test/r/view.result: Update results after merge (note that INSERT IGNORE will work again after next merge from 4.1) mysql-test/t/derived.test: Removed empty line mysql-test/t/grant.test: Update results after merge mysql-test/t/information_schema_inno.test: added missing drop table mysql-test/t/lowercase_table.test: safety fix mysql-test/t/multi_update.test: safety fix mysql-test/t/ps_1general.test: safety fix mysql-test/t/view.test: update error codes after merge ndb/src/mgmsrv/main.cpp: after merge fix ndb/tools/ndb_test_platform.cpp: removed compiler warnings regex/main.c: remove compiler warnings sql/field.cc: Remove compiler warning sql/gen_lex_hash.cc: Added DBUG support sql/ha_myisam.cc: Removed warning from valgrind sql/ha_ndbcluster.cc: Remove compiler warning sql/item_cmpfunc.cc: Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element sql/mysqld.cc: Remove compiler warning sql/sql_acl.cc: More debugging sql/sql_lex.cc: Remove unnecessary 'else' sql/sql_parse.cc: After merge fixes Simplify reset of thd->server_status for SQLCOM_CALL sql/sql_prepare.cc: After merge fixes Removed possible core dump in mysql_stmt_fetch() sql/sql_update.cc: After merge fixes (together with Sanja) strings/ctype-czech.c: Remove compiler warning strings/ctype-ucs2.c: Remove compiler warning strings/ctype-win1250ch.c: Remove compiler warning strings/xml.c: Remove compiler warning tests/client_test.c: Fix test to work with 5.0 vio/test-sslserver.c: Portability fix
This commit is contained in:
parent
bb2d3eaa30
commit
2e8d13c73e
64 changed files with 295 additions and 249 deletions
|
@ -287,7 +287,7 @@ case $default_charset in
|
|||
;;
|
||||
latin1)
|
||||
default_charset_default_collation="latin1_swedish_ci"
|
||||
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_swedish_ci"
|
||||
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_spanish_ci latin1_swedish_ci"
|
||||
;;
|
||||
latin2)
|
||||
default_charset_default_collation="latin2_general_ci"
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
#include <my_global.h>
|
||||
#include <m_string.h>
|
||||
#include <my_pthread.h>
|
||||
|
||||
static char *my_name;
|
||||
static int verbose;
|
||||
|
@ -246,7 +247,7 @@ char *m_name;
|
|||
modules[n_items].m_stkuse = 0;
|
||||
DBUG_RETURN (n_items++);
|
||||
}
|
||||
while (cmp = strcmp (m_name,modules[ind].name)) {
|
||||
while ((cmp = strcmp (m_name,modules[ind].name))) {
|
||||
if (cmp < 0) { /* In left subtree */
|
||||
if (s_table[ind].lchild == MAXPROCS) {
|
||||
/* Add as left child */
|
||||
|
@ -392,7 +393,7 @@ FILE *inf;
|
|||
}
|
||||
break;
|
||||
default:
|
||||
fprintf (stderr, "unknown record type '%s'\n", buf[0]);
|
||||
fprintf (stderr, "unknown record type '%c'\n", buf[0]);
|
||||
break;
|
||||
}
|
||||
next_line:;
|
||||
|
@ -450,10 +451,11 @@ FILE *outf;
|
|||
unsigned long int sum_calls, sum_time;
|
||||
{
|
||||
DBUG_ENTER ("out_trailer");
|
||||
if (verbose) {
|
||||
fprintf (outf, "======\t==========\t===========\t==========\t========\n");
|
||||
fprintf (outf, "%6d\t%10.2f\t%11d\t%10.2f\t\t%-15s\n",
|
||||
sum_calls, 100.0, sum_time, 100.0, "Totals");
|
||||
if (verbose)
|
||||
{
|
||||
fprintf(outf, "======\t==========\t===========\t==========\t========\n");
|
||||
fprintf(outf, "%6ld\t%10.2f\t%11ld\t%10.2f\t\t%-15s\n",
|
||||
sum_calls, 100.0, sum_time, 100.0, "Totals");
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -488,16 +490,16 @@ unsigned long int *called, *timed;
|
|||
import = (unsigned int) (per_time * per_calls);
|
||||
|
||||
if (verbose) {
|
||||
fprintf (outf, "%6d\t%10.2f\t%11d\t%10.2f %10d\t%-15s\n",
|
||||
fprintf (outf, "%6d\t%10.2f\t%11ld\t%10.2f %10d\t%-15s\n",
|
||||
calls, per_calls, time, per_time, import, name);
|
||||
} else {
|
||||
ms_per_call = time;
|
||||
ms_per_call /= calls;
|
||||
ftime = time;
|
||||
ftime /= 1000;
|
||||
fprintf (outf, "%8.2f%8.3f%8u%8.3f%8.2f%8u%8u %-s\n",
|
||||
per_time, ftime, calls, ms_per_call, per_calls, import,
|
||||
stkuse, name);
|
||||
fprintf(outf, "%8.2f%8.3f%8u%8.3f%8.2f%8u%8lu %-s\n",
|
||||
per_time, ftime, calls, ms_per_call, per_calls, import,
|
||||
stkuse, name);
|
||||
}
|
||||
*called = calls;
|
||||
*timed = time;
|
||||
|
|
|
@ -25,17 +25,17 @@
|
|||
|
||||
typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
{
|
||||
CHARSET_INFO *charset;
|
||||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
uint16 flag;
|
||||
uint16 length; /* Keylength */
|
||||
uint8 type; /* Type of key (for sort) */
|
||||
uint8 language;
|
||||
uint8 null_bit; /* bitmask to test for NULL */
|
||||
uint8 bit_start,bit_end; /* if bit field */
|
||||
uint16 flag;
|
||||
uint16 length; /* Keylength */
|
||||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
CHARSET_INFO *charset;
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
} HA_KEYSEG;
|
||||
|
||||
#define get_key_length(length,key) \
|
||||
|
|
|
@ -8,6 +8,7 @@ Created 4/24/1996 Heikki Tuuri
|
|||
*******************************************************/
|
||||
|
||||
#include "dict0load.h"
|
||||
#include "mysql_version.h"
|
||||
|
||||
#ifdef UNIV_NONINL
|
||||
#include "dict0load.ic"
|
||||
|
@ -766,7 +767,7 @@ dict_load_table(
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
#if MYSQL_VERSION_ID < 50300
|
||||
#if MYSQL_VERSION_ID < 50003
|
||||
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
|
||||
"compact format" flag. */
|
||||
field = rec_get_nth_field(rec, 7, &len);
|
||||
|
|
|
@ -614,9 +614,9 @@ fil_try_to_close_file_in_LRU(
|
|||
fputs("InnoDB: cannot close file ", stderr);
|
||||
ut_print_filename(stderr, node->name);
|
||||
fprintf(stderr,
|
||||
", because mod_count %lld != fl_count %lld\n",
|
||||
node->modification_counter,
|
||||
node->flush_counter);
|
||||
", because mod_count %ld != fl_count %ld\n",
|
||||
(long) node->modification_counter,
|
||||
(long) node->flush_counter);
|
||||
}
|
||||
|
||||
node = UT_LIST_GET_PREV(LRU, node);
|
||||
|
|
|
@ -1681,7 +1681,7 @@ os_file_set_size(
|
|||
}
|
||||
|
||||
/* Print about progress for each 100 MB written */
|
||||
if ((offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
|
||||
if ((ib_longlong) (offset + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
|
||||
!= offset / (ib_longlong)(100 * 1024 * 1024)) {
|
||||
|
||||
fprintf(stderr, " %lu00",
|
||||
|
|
|
@ -211,6 +211,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
|
|||
uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
|
||||
byte *lastkey_buf=ftbw->word+ftbw->off;
|
||||
|
||||
LINT_INIT(off);
|
||||
if (ftbw->flags & FTB_FLAG_TRUNC)
|
||||
lastkey_buf+=ftbw->len;
|
||||
|
||||
|
|
|
@ -25,23 +25,25 @@ char ft_boolean_syntax[]="+ -><()~*:\"\"&|";
|
|||
|
||||
const HA_KEYSEG ft_keysegs[FT_SEGS]={
|
||||
{
|
||||
HA_KEYTYPE_VARTEXT2, /* type */
|
||||
63, /* language (will be overwritten) */
|
||||
0, 2, 0, /* null_bit, bit_start, bit_end */
|
||||
HA_VAR_LENGTH_PART | HA_PACK_KEY, /* flag */
|
||||
HA_FT_MAXBYTELEN, /* length */
|
||||
HA_FT_WLEN, /* start */
|
||||
0, /* null_pos */
|
||||
NULL /* charset */
|
||||
},
|
||||
{
|
||||
/*
|
||||
Note, this (and the last HA_KEYTYPE_END) segment should NOT
|
||||
be packed in any way, otherwise w_search() won't be able to
|
||||
update key entry 'in vivo'
|
||||
*/
|
||||
HA_FT_WTYPE, 63, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, 0, 0, NULL
|
||||
}
|
||||
NullS, /* charset */
|
||||
HA_FT_WLEN, /* start */
|
||||
0, /* null_pos */
|
||||
0, /* Bit pos */
|
||||
HA_VAR_LENGTH_PART | HA_PACK_KEY, /* flag */
|
||||
HA_FT_MAXBYTELEN, /* length */
|
||||
HA_KEYTYPE_VARTEXT2, /* type */
|
||||
63, /* language (will be overwritten) */
|
||||
0, /* null_bit */
|
||||
2, 0, 0 /* bit_start, bit_end, bit_length */
|
||||
},
|
||||
{
|
||||
/*
|
||||
Note, this (and the last HA_KEYTYPE_END) segment should NOT
|
||||
be packed in any way, otherwise w_search() won't be able to
|
||||
update key entry 'in vivo'
|
||||
*/
|
||||
NullS, 0, 0, 0, HA_NO_SORT, HA_FT_WLEN, HA_FT_WTYPE, 63, 0, 0, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
const struct _ft_vft _ft_vft_nlq = {
|
||||
|
|
|
@ -1047,17 +1047,19 @@ int mi_keyseg_write(File file, const HA_KEYSEG *keyseg)
|
|||
{
|
||||
uchar buff[HA_KEYSEG_SIZE];
|
||||
uchar *ptr=buff;
|
||||
ulong pos;
|
||||
|
||||
*ptr++ =keyseg->type;
|
||||
*ptr++ =keyseg->language;
|
||||
*ptr++ =keyseg->null_bit;
|
||||
*ptr++ =keyseg->bit_start;
|
||||
*ptr++ =keyseg->bit_end;
|
||||
*ptr++= keyseg->type;
|
||||
*ptr++= keyseg->language;
|
||||
*ptr++= keyseg->null_bit;
|
||||
*ptr++= keyseg->bit_start;
|
||||
*ptr++= keyseg->bit_end;
|
||||
*ptr++= keyseg->bit_length;
|
||||
mi_int2store(ptr,keyseg->flag); ptr+=2;
|
||||
mi_int2store(ptr,keyseg->length); ptr+=2;
|
||||
mi_int4store(ptr,keyseg->start); ptr+=4;
|
||||
mi_int4store(ptr, keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos);
|
||||
pos= keyseg->null_bit ? keyseg->null_pos : keyseg->bit_pos;
|
||||
mi_int4store(ptr, pos);
|
||||
ptr+=4;
|
||||
|
||||
return my_write(file,(char*) buff, (uint) (ptr-buff), MYF(MY_NABP));
|
||||
|
|
|
@ -27,4 +27,4 @@ LIST *myrg_open_list=0;
|
|||
static const char *merge_insert_methods[] =
|
||||
{ "FIRST", "LAST", NullS };
|
||||
TYPELIB merge_insert_method= { array_elements(merge_insert_methods)-1,"",
|
||||
merge_insert_methods};
|
||||
merge_insert_methods, 0};
|
||||
|
|
|
@ -358,15 +358,17 @@ show grants for mysqltest_3@localhost;
|
|||
Grants for mysqltest_3@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
|
||||
GRANT SELECT (b) ON `mysqltest_1`.`t2` TO 'mysqltest_3'@'localhost'
|
||||
GRANT SELECT (c) ON `mysqltest_2`.`t1` TO 'mysqltest_3'@'localhost'
|
||||
GRANT UPDATE (a) ON `mysqltest_1`.`t1` TO 'mysqltest_3'@'localhost'
|
||||
GRANT UPDATE (d) ON `mysqltest_2`.`t2` TO 'mysqltest_3'@'localhost'
|
||||
GRANT SELECT (c) ON `mysqltest_2`.`t1` TO 'mysqltest_3'@'localhost'
|
||||
update mysqltest_1.t1, mysqltest_1.t2 set q=10 where b=1;
|
||||
ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'q' in table 't1'
|
||||
update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1;
|
||||
update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'd' in table 't2'
|
||||
update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1;
|
||||
ERROR 42000: select command denied to user 'mysqltest_3'@'localhost' for table 't1'
|
||||
update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1;
|
||||
ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
|
||||
ERROR 42000: update command denied to user 'mysqltest_3'@'localhost' for table 't1'
|
||||
update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 's' in table 't1'
|
||||
update mysqltest_1.t1, mysqltest_2.t2 set a=10,d=10;
|
||||
|
@ -387,7 +389,7 @@ flush privileges;
|
|||
use mysqltest_1;
|
||||
update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600;
|
||||
update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
|
||||
ERROR 42000: UPDATE command denied to user 'mysqltest_3'@'localhost' for column 'a' in table 't1'
|
||||
ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest_1'
|
||||
use mysqltest_2;
|
||||
update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
|
||||
ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysqltest_1'
|
||||
|
|
|
@ -342,7 +342,7 @@ set @save_join_buffer_size=@@join_buffer_size;
|
|||
set join_buffer_size= 4000;
|
||||
show variables like 'join_buffer_size';
|
||||
Variable_name Value
|
||||
join_buffer_size 8228
|
||||
join_buffer_size 8200
|
||||
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
DROP TABLE IF EXISTS t1,t2;
|
||||
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
|
||||
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id),
|
||||
FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
drop table if exists t1,t2,t3,t4;
|
||||
drop table if exists t0,t5,t6,t7,t8,t9;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v0, v1, v2, v3, v4;
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
drop table if exists t1,t2,t3;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v1;
|
||||
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
|
||||
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
|
||||
delete from mysql.user where user=_binary'mysqltest_1';
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
drop table if exists t5, t6, t7, t8;
|
||||
drop database if exists mysqltest ;
|
||||
drop database if exists testtets;
|
||||
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
test_sequence
|
||||
------ basic tests ------
|
||||
drop table if exists t1, t9 ;
|
||||
|
|
|
@ -1943,7 +1943,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -2040,7 +2040,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2128,7 +2128,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2218,7 +2218,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
|
|
@ -1926,7 +1926,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -2023,7 +2023,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2111,7 +2111,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2201,7 +2201,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
|
|
@ -1927,7 +1927,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -2024,7 +2024,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2112,7 +2112,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2202,7 +2202,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 0 31 8
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
|
|
@ -1863,7 +1863,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -1960,7 +1960,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2048,7 +2048,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2138,7 +2138,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -4872,7 +4872,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -4969,7 +4969,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -5057,7 +5057,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -5147,7 +5147,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
|
|
@ -1926,7 +1926,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
|
@ -2023,7 +2023,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
@ -2111,7 +2111,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
|
@ -2201,7 +2201,7 @@ def @arg28 253 8192 10 Y 0 31 8
|
|||
def @arg29 253 8192 8 Y 128 31 63
|
||||
def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 128 31 63
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
|
|
|
@ -338,9 +338,9 @@ delete from t2 where b=3;
|
|||
delete from t3 where a=3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 HEAP 9 Fixed 4 # # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 HEAP 9 Fixed 4 # # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 HEAP 9 Fixed 4 # # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 HEAP 9 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
delete from t3;
|
||||
|
@ -362,9 +362,9 @@ delete from t2 where b=5;
|
|||
delete from t3 where a=5;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 HEAP 9 Fixed 0 # # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 HEAP 9 Fixed 0 # # # # 5 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 HEAP 9 Fixed 0 # # # # 9 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 HEAP 9 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2, t3;
|
||||
create database mysqltest;
|
||||
show create database mysqltest;
|
||||
|
|
|
@ -1495,6 +1495,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < (select max(`test`.`t2`.`b`) from `test`.`t2`)))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
|
@ -1502,7 +1503,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3 where <nop>((test.t3.a >= (select min(test.t2.b) from test.t2)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= (select min(`test`.`t2`.`b`) from `test`.`t2`)))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
|
@ -1513,7 +1514,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3 where <not>((test.t3.a < <max>(select test.t2.b AS `b` from test.t2 group by test.t2.b)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>((`test`.`t3`.`a` < <max>(select `test`.`t2`.`b` AS `b` from `test`.`t2` group by 1)))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
|
@ -1521,7 +1522,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3 where <nop>((test.t3.a >= <min>(select test.t2.b AS `b` from test.t2 group by test.t2.b)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>((`test`.`t3`.`a` >= <min>(select `test`.`t2`.`b` AS `b` from `test`.`t2` group by 1)))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
|
@ -1529,7 +1530,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3`
|
||||
select * from t3 where NULL >= any (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2 group by 1);
|
||||
|
@ -1537,7 +1538,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3`
|
||||
select * from t3 where NULL >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= some (select b from t2);
|
||||
|
@ -1545,7 +1546,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3`
|
||||
select * from t3 where NULL >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= some (select b from t2 group by 1);
|
||||
|
@ -1553,7 +1554,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 const row not found
|
||||
Warnings:
|
||||
Note 1003 select test.t3.a AS `a` from test.t3
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3`
|
||||
insert into t2 values (2,2), (2,1), (3,3), (3,1);
|
||||
select * from t3 where a > all (select max(b) from t2 group by a);
|
||||
a
|
||||
|
|
|
@ -289,7 +289,9 @@ set time_zone= '+00:00';
|
|||
set time_zone= 'Europe/Moscow';
|
||||
select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC');
|
||||
convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC')
|
||||
2004-12-01 09:00:00
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect datetime value: '2004-11-31 12:00:00'
|
||||
select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
|
||||
convert_tz(b, 'Europe/Moscow', 'UTC')
|
||||
update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
|
||||
|
|
|
@ -659,7 +659,7 @@ ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column
|
|||
update v2 set c=a+c;
|
||||
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2'
|
||||
update t2,v3 set v3.a=v3.a+v3.c where t2.x=v3.c;
|
||||
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'a' in table 'v3'
|
||||
ERROR 42000: update command denied to user 'mysqltest_1'@'localhost' for table 'v3'
|
||||
update v3 set a=a+c;
|
||||
ERROR 42000: update command denied to user 'mysqltest_1'@'localhost' for table 'v3'
|
||||
use test;
|
||||
|
@ -1433,8 +1433,7 @@ insert into v1 values (1) on duplicate key update a=2;
|
|||
insert into v1 values (1) on duplicate key update a=2;
|
||||
ERROR HY000: CHECK OPTION failed 'test.v1'
|
||||
insert ignore into v1 values (1) on duplicate key update a=2;
|
||||
Warnings:
|
||||
Error 1369 CHECK OPTION failed 'test.v1'
|
||||
ERROR HY000: CHECK OPTION failed 'test.v1'
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
|
|
|
@ -140,7 +140,6 @@ select * from ( select * from t1 union select * from t1) a,(select * from t1 uni
|
|||
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
|
||||
drop table t1;
|
||||
|
||||
|
||||
#
|
||||
# multi-update & multi-delete with derived tables
|
||||
#
|
||||
|
|
|
@ -309,8 +309,10 @@ show grants for mysqltest_3@localhost;
|
|||
--error 1143
|
||||
update mysqltest_1.t1, mysqltest_1.t2 set q=10 where b=1;
|
||||
--error 1143
|
||||
update mysqltest_1.t2, mysqltest_2.t2 set d=20 where d=1;
|
||||
--error 1142
|
||||
update mysqltest_1.t1, mysqltest_2.t2 set d=20 where d=1;
|
||||
--error 1143
|
||||
--error 1142
|
||||
update mysqltest_2.t1, mysqltest_1.t2 set c=20 where b=1;
|
||||
--error 1143
|
||||
update mysqltest_2.t1, mysqltest_2.t2 set d=10 where s=2;
|
||||
|
@ -335,7 +337,7 @@ connection conn2;
|
|||
use mysqltest_1;
|
||||
update mysqltest_2.t1, mysqltest_2.t2 set c=500,d=600;
|
||||
# the following failed before, should fail now.
|
||||
--error 1143
|
||||
--error 1044
|
||||
update mysqltest_1.t1, mysqltest_1.t2 set a=100,b=200;
|
||||
use mysqltest_2;
|
||||
#the following used to succeed, it must fail now.
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
-- source include/have_innodb.inc
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Test for KEY_COLUMN_USAGE & TABLE_CONSTRAINTS tables
|
||||
|
|
|
@ -7,6 +7,7 @@ drop table if exists t1,t2,t3,t4;
|
|||
# Clear up from other tests (to ensure that SHOW TABLES below is right)
|
||||
drop table if exists t0,t5,t6,t7,t8,t9;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v0, v1, v2, v3, v4;
|
||||
--enable_warnings
|
||||
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v1;
|
||||
--error 0,1141
|
||||
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
|
||||
--error 0,1141
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
--disable_warnings
|
||||
drop table if exists t5, t6, t7, t8;
|
||||
drop database if exists mysqltest ;
|
||||
# Cleanup from other tests
|
||||
drop database if exists testtets;
|
||||
drop table if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
drop view if exists t1Aa,t2Aa,v1Aa,v2Aa;
|
||||
--enable_warnings
|
||||
|
||||
--disable_query_log
|
||||
|
|
|
@ -528,7 +528,7 @@ update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c;
|
|||
-- error 1143
|
||||
update v2 set c=a+c;
|
||||
# no rights for view
|
||||
-- error 1143
|
||||
-- error 1142
|
||||
update t2,v3 set v3.a=v3.a+v3.c where t2.x=v3.c;
|
||||
-- error 1142
|
||||
update v3 set a=a+c;
|
||||
|
@ -1394,6 +1394,7 @@ create view v1 as select * from t1 where a < 2 with check option;
|
|||
insert into v1 values (1) on duplicate key update a=2;
|
||||
-- error 1369
|
||||
insert into v1 values (1) on duplicate key update a=2;
|
||||
-- error 1369
|
||||
insert ignore into v1 values (1) on duplicate key update a=2;
|
||||
select * from t1;
|
||||
drop view v1;
|
||||
|
|
|
@ -89,7 +89,6 @@ bool g_StopServer;
|
|||
extern EventLogger g_EventLogger;
|
||||
|
||||
extern int global_mgmt_server_check;
|
||||
static char *opt_connect_str= 0;
|
||||
|
||||
enum ndb_mgmd_options {
|
||||
NDB_STD_OPTS_OPTIONS,
|
||||
|
|
|
@ -33,14 +33,14 @@ int test_snprintf(const char * fmt, int buf_sz, int result)
|
|||
if(ret < 0)
|
||||
{
|
||||
printf("BaseString::snprint returns %d with size=%d and strlen(fmt)=%d\n",
|
||||
ret, buf_sz, strlen(fmt));
|
||||
ret, buf_sz, (int) strlen(fmt));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(ret+1 == buf_sz)
|
||||
{
|
||||
printf("BaseString::snprint truncates returns %d with size=%d and strlen(fmt)=%d\n",
|
||||
ret, buf_sz, strlen(fmt));
|
||||
ret, buf_sz, (int) strlen(fmt));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ main(void)
|
|||
if (sizeof(UintPtr) != sizeof(Uint32*))
|
||||
{
|
||||
printf("sizeof(UintPtr)=%d != sizeof(Uint32*)=%d\n",
|
||||
sizeof(UintPtr), sizeof(Uint32*));
|
||||
(int) sizeof(UintPtr), (int) sizeof(Uint32*));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ char *argv[];
|
|||
if (err) {
|
||||
len = regerror(err, &re, erbuf, sizeof(erbuf));
|
||||
fprintf(stderr, "error %s, %d/%d `%s'\n",
|
||||
eprint(err), len, (int) sizeof(erbuf), erbuf);
|
||||
eprint(err), (int) len, (int) sizeof(erbuf), erbuf);
|
||||
exit(status);
|
||||
}
|
||||
regprint(&re, stdout);
|
||||
|
|
|
@ -342,9 +342,10 @@ String *Field::val_int_as_str(String *val_buffer, my_bool unsigned_flag)
|
|||
longlong value= val_int();
|
||||
if (val_buffer->alloc(length))
|
||||
return 0;
|
||||
length= (uint) cs->cset->longlong10_to_str(cs, (char*) val_buffer->ptr(),
|
||||
length, unsigned_flag ? 10 : -10,
|
||||
value);
|
||||
length= (uint) (*cs->cset->longlong10_to_str)(cs, (char*) val_buffer->ptr(),
|
||||
length,
|
||||
unsigned_flag ? 10 : -10,
|
||||
value);
|
||||
val_buffer->length(length);
|
||||
return val_buffer;
|
||||
}
|
||||
|
|
|
@ -83,8 +83,17 @@ TODO:
|
|||
#include "mysql_version.h"
|
||||
#include "lex.h"
|
||||
|
||||
const char *default_dbug_option="d:t:o,/tmp/gen_lex_hash.trace";
|
||||
|
||||
struct my_option my_long_options[] =
|
||||
{
|
||||
#ifdef DBUG_OFF
|
||||
{"debug", '#', "This is a non-debug version. Catch this and exit",
|
||||
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#else
|
||||
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
|
||||
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"help", '?', "Display help and exit",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"version", 'V', "Output version information and exit",
|
||||
|
@ -108,7 +117,7 @@ hash_lex_struct *get_hash_struct_by_len(hash_lex_struct **root_by_len,
|
|||
{
|
||||
if (*max_len<len){
|
||||
*root_by_len= (hash_lex_struct *)realloc((char*)*root_by_len,
|
||||
sizeof(hash_lex_struct)*len);
|
||||
sizeof(hash_lex_struct)*len);
|
||||
hash_lex_struct *cur, *end= *root_by_len + len;
|
||||
for (cur= *root_by_len + *max_len; cur<end; cur++)
|
||||
cur->first_char= 0;
|
||||
|
@ -353,6 +362,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
case '?':
|
||||
usage(0);
|
||||
exit(0);
|
||||
case '#':
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -425,11 +437,12 @@ int check_duplicates()
|
|||
int main(int argc,char **argv)
|
||||
{
|
||||
MY_INIT(argv[0]);
|
||||
DBUG_PROCESS(argv[0]);
|
||||
|
||||
if (get_options(argc,(char **) argv))
|
||||
exit(1);
|
||||
|
||||
printf("/* Copyright (C) 2001 MySQL AB\n\
|
||||
printf("/* Copyright (C) 2001-2004 MySQL AB\n\
|
||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
||||
and you are welcome to modify and redistribute it under the GPL license\n\
|
||||
\n*/\n\n");
|
||||
|
@ -449,9 +462,8 @@ int main(int argc,char **argv)
|
|||
printf("\nunsigned int sql_functions_max_len=%d;\n",max_len);
|
||||
printf("\nunsigned int symbols_max_len=%d;\n\n",max_len2);
|
||||
|
||||
printf
|
||||
(
|
||||
"inline SYMBOL *get_hash_symbol(const char *s,\n\
|
||||
printf("\
|
||||
inline SYMBOL *get_hash_symbol(const char *s,\n \
|
||||
unsigned int len,bool function)\n\
|
||||
{\n\
|
||||
register uchar *hash_map;\n\
|
||||
|
@ -516,5 +528,7 @@ int main(int argc,char **argv)
|
|||
}\n\
|
||||
}\n"
|
||||
);
|
||||
my_end(0);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1410,8 +1410,9 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
|
|||
keydef[i].seg[j].start= pos->key_part[j].offset;
|
||||
keydef[i].seg[j].length= pos->key_part[j].length;
|
||||
keydef[i].seg[j].bit_start= keydef[i].seg[j].bit_end=
|
||||
keydef[i].seg[j].bit_pos= 0;
|
||||
keydef[i].seg[j].language = field->charset()->number;
|
||||
keydef[i].seg[j].bit_length= 0;
|
||||
keydef[i].seg[j].bit_pos= 0;
|
||||
keydef[i].seg[j].language= field->charset()->number;
|
||||
|
||||
if (field->null_ptr)
|
||||
{
|
||||
|
|
|
@ -408,6 +408,7 @@ static inline bool ndb_supported_type(enum_field_types type)
|
|||
case MYSQL_TYPE_NULL:
|
||||
case MYSQL_TYPE_GEOMETRY:
|
||||
case MYSQL_TYPE_VARCHAR:
|
||||
case MYSQL_TYPE_BIT:
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <m_ctype.h>
|
||||
#include "my_dir.h"
|
||||
#include "sp_rcontext.h"
|
||||
#include "sql_acl.h"
|
||||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
#include "sql_select.h"
|
||||
|
@ -1925,6 +1924,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **reference)
|
|||
|
||||
/* Search in the SELECT and GROUP lists of the outer select. */
|
||||
if (outer_sel->resolve_mode == SELECT_LEX::SELECT_MODE)
|
||||
{
|
||||
if (!(ref= resolve_ref_in_select_and_group(thd, this, outer_sel)))
|
||||
return TRUE; /* Some error occured (e.g. ambigous names). */
|
||||
if (ref != not_found_item)
|
||||
|
|
|
@ -1120,9 +1120,9 @@ public:
|
|||
/* Constructor need to process subselect with temporary tables (see Item) */
|
||||
Item_direct_ref(THD *thd, Item_direct_ref *item) : Item_ref(thd, item) {}
|
||||
|
||||
double val()
|
||||
double val_real()
|
||||
{
|
||||
double tmp=(*ref)->val();
|
||||
double tmp=(*ref)->val_real();
|
||||
null_value=(*ref)->null_value;
|
||||
return tmp;
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ void Item_func_not_all::print(String *str)
|
|||
longlong Item_func_nop_all::val_int()
|
||||
{
|
||||
DBUG_ASSERT(fixed == 1);
|
||||
double value= args[0]->val();
|
||||
longlong value= args[0]->val_int();
|
||||
|
||||
/*
|
||||
return FALSE if there was records in underlaying select in max/min
|
||||
|
|
|
@ -635,7 +635,8 @@ bool mysql_multi_update(THD *thd, TABLE_LIST *table_list,
|
|||
bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
|
||||
List<Item> &fields, List_item *values,
|
||||
List<Item> &update_fields,
|
||||
List<Item> &update_values, enum_duplicates duplic);
|
||||
List<Item> &update_values, enum_duplicates duplic,
|
||||
COND **where, bool select_insert);
|
||||
bool mysql_insert(THD *thd,TABLE_LIST *table,List<Item> &fields,
|
||||
List<List_item> &values, List<Item> &update_fields,
|
||||
List<Item> &update_values, enum_duplicates flag);
|
||||
|
|
|
@ -2124,7 +2124,7 @@ extern "C" void *signal_hand(void *arg __attribute__((unused)))
|
|||
if (!(opt_specialflag & SPECIAL_NO_PRIOR))
|
||||
my_pthread_attr_setprio(&connection_attrib,INTERRUPT_PRIOR);
|
||||
if (pthread_create(&tmp,&connection_attrib, kill_server_thread,
|
||||
(void*) sig))
|
||||
(void*) &sig))
|
||||
sql_print_error("Can't create thread to kill server");
|
||||
#else
|
||||
kill_server((void*) sig); // MIT THREAD has a alarm thread
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_acl.h"
|
||||
#include "sp.h"
|
||||
#include "sp_head.h"
|
||||
#include "sp_cache.h"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#endif
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_acl.h"
|
||||
#include "sp_head.h"
|
||||
#include "sp.h"
|
||||
#include "sp_pcontext.h"
|
||||
|
|
|
@ -2981,15 +2981,17 @@ err:
|
|||
|
||||
|
||||
bool check_grant_column(THD *thd, GRANT_INFO *grant,
|
||||
char*db_name, char *table_name,
|
||||
char *db_name, char *table_name,
|
||||
const char *name, uint length, uint show_tables)
|
||||
{
|
||||
GRANT_TABLE *grant_table;
|
||||
GRANT_COLUMN *grant_column;
|
||||
|
||||
ulong want_access= grant->want_privilege & ~grant->privilege;
|
||||
DBUG_ENTER("check_grant_column");
|
||||
DBUG_PRINT("enter", ("table: %s want_access: %u", table_name, want_access));
|
||||
|
||||
if (!want_access)
|
||||
return 0; // Already checked
|
||||
DBUG_RETURN(0); // Already checked
|
||||
|
||||
rw_rdlock(&LOCK_grant);
|
||||
|
||||
|
@ -3000,7 +3002,7 @@ bool check_grant_column(THD *thd, GRANT_INFO *grant,
|
|||
grant->grant_table=
|
||||
table_hash_search(thd->host, thd->ip, db_name,
|
||||
thd->priv_user,
|
||||
table_name, 0); /* purecov: inspected */
|
||||
table_name, 0); /* purecov: inspected */
|
||||
grant->version= grant_version; /* purecov: inspected */
|
||||
}
|
||||
if (!(grant_table= grant->grant_table))
|
||||
|
@ -3010,13 +3012,13 @@ bool check_grant_column(THD *thd, GRANT_INFO *grant,
|
|||
if (grant_column && !(~grant_column->rights & want_access))
|
||||
{
|
||||
rw_unlock(&LOCK_grant);
|
||||
return 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
#ifdef NOT_USED
|
||||
if (show_tables && (grant_column || grant->privilege & COL_ACLS))
|
||||
{
|
||||
rw_unlock(&LOCK_grant); /* purecov: deadcode */
|
||||
return 0; /* purecov: deadcode */
|
||||
DBUG_RETURN(0); /* purecov: deadcode */
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3033,7 +3035,7 @@ err:
|
|||
name,
|
||||
table_name);
|
||||
}
|
||||
return 1;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2067,10 +2067,10 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list,
|
|||
uint *cached_field_index_ptr,
|
||||
bool register_tree_change)
|
||||
{
|
||||
DBUG_ENTER("find_field_in_table");
|
||||
DBUG_PRINT("enter", ("table:%s name: %s item name %s, ref 0x%lx",
|
||||
table_list->alias, name, item_name, (ulong)ref));
|
||||
Field *fld;
|
||||
DBUG_ENTER("find_field_in_table");
|
||||
DBUG_PRINT("enter", ("table: '%s' name: '%s' item name: '%s' ref 0x%lx",
|
||||
table_list->alias, name, item_name, (ulong) ref));
|
||||
if (table_list->field_translation)
|
||||
{
|
||||
DBUG_ASSERT(ref != 0 && table_list->view != 0);
|
||||
|
@ -2097,10 +2097,7 @@ find_field_in_table(THD *thd, TABLE_LIST *table_list,
|
|||
item_name);
|
||||
/* as far as Item_ref have defined reference it do not need tables */
|
||||
if (register_tree_change && item_ref)
|
||||
{
|
||||
thd->change_item_tree(ref, item_ref);
|
||||
(*ref)->fix_fields(thd, 0, ref);
|
||||
}
|
||||
}
|
||||
DBUG_RETURN((Field*) view_ref_found);
|
||||
}
|
||||
|
@ -2788,6 +2785,7 @@ TABLE_LIST **make_leaves_list(TABLE_LIST **list, TABLE_LIST *tables)
|
|||
bool setup_tables(THD *thd, TABLE_LIST *tables, Item **conds,
|
||||
TABLE_LIST **leaves, bool refresh, bool select_insert)
|
||||
{
|
||||
uint tablenr= 0;
|
||||
DBUG_ENTER("setup_tables");
|
||||
/*
|
||||
this is used for INSERT ... SELECT.
|
||||
|
@ -2800,13 +2798,9 @@ bool setup_tables(THD *thd, TABLE_LIST *tables, Item **conds,
|
|||
DBUG_RETURN(0);
|
||||
tables->setup_is_done= 1;
|
||||
|
||||
|
||||
if (!(*leaves))
|
||||
{
|
||||
make_leaves_list(leaves, tables);
|
||||
}
|
||||
|
||||
uint tablenr= 0;
|
||||
for (TABLE_LIST *table_list= *leaves;
|
||||
table_list;
|
||||
table_list= table_list->next_leaf, tablenr++)
|
||||
|
|
|
@ -1401,7 +1401,7 @@ public:
|
|||
List<create_field> &fields_par,
|
||||
List<Key> &keys_par,
|
||||
List<Item> &select_fields,enum_duplicates duplic)
|
||||
:select_insert (NULL, NULL, &select_fields, duplic, 0), create_table(table),
|
||||
:select_insert (NULL, NULL, &select_fields, 0, 0, duplic, 0), create_table(table),
|
||||
extra_fields(&fields_par),keys(&keys_par), create_info(create_info_par),
|
||||
lock(0)
|
||||
{}
|
||||
|
|
|
@ -180,6 +180,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||
char *query= thd->query;
|
||||
#endif
|
||||
thr_lock_type lock_type = table_list->lock_type;
|
||||
Item *unused_conds= 0;
|
||||
DBUG_ENTER("mysql_insert");
|
||||
|
||||
/*
|
||||
|
@ -244,7 +245,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||
values= its++;
|
||||
|
||||
if (mysql_prepare_insert(thd, table_list, table, fields, values,
|
||||
update_fields, update_values, duplic))
|
||||
update_fields, update_values, duplic, &unused_conds,
|
||||
FALSE))
|
||||
goto abort;
|
||||
|
||||
/* mysql_prepare_insert set table_list->table if it was not set */
|
||||
|
@ -651,6 +653,10 @@ static bool mysql_prepare_insert_check_table(THD *thd, TABLE_LIST *table_list,
|
|||
mysql_prepare_insert()
|
||||
thd Thread handler
|
||||
table_list Global/local table list
|
||||
table Table to insert into (can be NULL if table should be taken from
|
||||
table_list->table)
|
||||
where Where clause (for insert ... select)
|
||||
select_insert TRUE if INSERT ... SELECT statement
|
||||
|
||||
RETURN VALUE
|
||||
FALSE OK
|
||||
|
@ -660,11 +666,11 @@ static bool mysql_prepare_insert_check_table(THD *thd, TABLE_LIST *table_list,
|
|||
bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
|
||||
List<Item> &fields, List_item *values,
|
||||
List<Item> &update_fields, List<Item> &update_values,
|
||||
enum_duplicates duplic)
|
||||
enum_duplicates duplic,
|
||||
COND **where, bool select_insert)
|
||||
{
|
||||
bool insert_into_view= (table_list->view != 0);
|
||||
/* TODO: use this condition for 'WITH CHECK OPTION' */
|
||||
Item *unused_conds= 0;
|
||||
bool res;
|
||||
DBUG_ENTER("mysql_prepare_insert");
|
||||
DBUG_PRINT("enter", ("table_list 0x%lx, table 0x%lx, view %d",
|
||||
|
@ -675,11 +681,11 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
|
|||
{
|
||||
/* it should be allocated before Item::fix_fields() */
|
||||
if (table_list->set_insert_values(thd->mem_root))
|
||||
goto abort;
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
if (mysql_prepare_insert_check_table(thd, table_list, fields, &unused_conds,
|
||||
FALSE))
|
||||
if (mysql_prepare_insert_check_table(thd, table_list, fields, where,
|
||||
select_insert))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if ((values && check_insert_fields(thd, table_list, fields, *values, 1,
|
||||
|
@ -799,7 +805,8 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||
DBUG_ASSERT(table->insert_values != NULL);
|
||||
store_record(table,insert_values);
|
||||
restore_record(table,record[1]);
|
||||
DBUG_ASSERT(info->update_fields->elements == info->update_values->elements);
|
||||
DBUG_ASSERT(info->update_fields->elements ==
|
||||
info->update_values->elements);
|
||||
if (fill_record(thd, *info->update_fields, *info->update_values, 0))
|
||||
goto err;
|
||||
|
||||
|
@ -808,7 +815,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
|||
(res= info->view->view_check_option(current_thd, info->ignore)) ==
|
||||
VIEW_CHECK_SKIP)
|
||||
break;
|
||||
else if (res == VIEW_CHECK_ERROR)
|
||||
if (res == VIEW_CHECK_ERROR)
|
||||
goto err;
|
||||
|
||||
if ((error=table->file->update_row(table->record[1],table->record[0])))
|
||||
|
@ -1715,23 +1722,25 @@ bool delayed_insert::handle_inserts(void)
|
|||
bool mysql_insert_select_prepare(THD *thd)
|
||||
{
|
||||
LEX *lex= thd->lex;
|
||||
TABLE_LIST* first_select_table=
|
||||
(TABLE_LIST*)lex->select_lex.table_list.first;
|
||||
TABLE_LIST* first_select_leaf_table;
|
||||
TABLE_LIST *first_select_table=
|
||||
(TABLE_LIST*) lex->select_lex.table_list.first;
|
||||
TABLE_LIST *first_select_leaf_table;
|
||||
int res;
|
||||
DBUG_ENTER("mysql_insert_select_prepare");
|
||||
/*
|
||||
SELECT_LEX do not belong to INSERT statement, so we can't add WHERE
|
||||
clasue if table is VIEW
|
||||
clause if table is VIEW
|
||||
*/
|
||||
lex->query_tables->no_where_clause= 1;
|
||||
if (mysql_prepare_insert_check_table(thd, lex->query_tables,
|
||||
lex->field_list,
|
||||
&lex->select_lex.where,
|
||||
TRUE))
|
||||
if (mysql_prepare_insert(thd, lex->query_tables,
|
||||
lex->query_tables->table, lex->field_list, 0,
|
||||
lex->update_list, lex->value_list,
|
||||
lex->duplicates,
|
||||
&lex->select_lex.where, TRUE))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
/*
|
||||
setup was done in mysql_insert_select_prepare, but we have to mark
|
||||
setup was done in mysql_prepare_insert_check_table, but we have to mark
|
||||
first local table
|
||||
*/
|
||||
if (first_select_table)
|
||||
|
|
|
@ -952,13 +952,12 @@ int yylex(void *arg, void *yythd)
|
|||
if ((thd->client_capabilities & CLIENT_MULTI_STATEMENTS) &&
|
||||
(thd->command != COM_PREPARE))
|
||||
{
|
||||
lex->found_colon=(char*)lex->ptr;
|
||||
thd->server_status |= SERVER_MORE_RESULTS_EXISTS;
|
||||
lex->next_state=MY_LEX_END;
|
||||
return(END_OF_INPUT);
|
||||
lex->found_colon= (char*) lex->ptr;
|
||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
||||
lex->next_state= MY_LEX_END;
|
||||
return (END_OF_INPUT);
|
||||
}
|
||||
else
|
||||
state=MY_LEX_CHAR; // Return ';'
|
||||
state= MY_LEX_CHAR; // Return ';'
|
||||
break;
|
||||
}
|
||||
/* fall true */
|
||||
|
|
|
@ -2983,13 +2983,8 @@ create_error:
|
|||
select_result *result;
|
||||
unit->set_limit(select_lex, select_lex);
|
||||
|
||||
if (!(res= open_and_lock_tables(thd, all_tables)) &&
|
||||
!(res= mysql_prepare_insert(thd, tables, first_local_table,
|
||||
tables->table, lex->field_list, 0,
|
||||
lex->update_list, lex->value_list,
|
||||
lex->duplicates)))
|
||||
if (!(res= open_and_lock_tables(thd, all_tables)))
|
||||
{
|
||||
TABLE *table= tables->table;
|
||||
/* Skip first table, which is the table we are inserting in */
|
||||
lex->select_lex.table_list.first= (byte*)first_table->next_local;
|
||||
|
||||
|
@ -3008,8 +3003,10 @@ create_error:
|
|||
res= handle_select(thd, lex, result);
|
||||
lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE;
|
||||
delete result;
|
||||
table->insert_values= 0;
|
||||
}
|
||||
/* in case of error first_table->table can be 0 */
|
||||
if (first_table->table)
|
||||
first_table->table->insert_values= 0;
|
||||
/* revert changes for SP */
|
||||
lex->select_lex.table_list.first= (byte*) first_table;
|
||||
}
|
||||
|
@ -3819,8 +3816,8 @@ create_error:
|
|||
st_sp_security_context save_ctx;
|
||||
#endif
|
||||
ha_rows select_limit;
|
||||
uint smrx;
|
||||
LINT_INIT(smrx);
|
||||
/* bits that should be cleared in thd->server_status */
|
||||
uint bits_to_be_cleared= 0;
|
||||
|
||||
/* In case the arguments are subselects... */
|
||||
if (all_tables &&
|
||||
|
@ -3842,8 +3839,13 @@ create_error:
|
|||
#endif
|
||||
goto error;
|
||||
}
|
||||
smrx= thd->server_status & SERVER_MORE_RESULTS_EXISTS;
|
||||
thd->server_status |= SERVER_MORE_RESULTS_EXISTS;
|
||||
/*
|
||||
If SERVER_MORE_RESULTS_EXISTS is not set,
|
||||
then remember that it should be cleared
|
||||
*/
|
||||
bits_to_be_cleared= (~thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
||||
}
|
||||
|
||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||
|
@ -3863,14 +3865,11 @@ create_error:
|
|||
#ifndef EMBEDDED_LIBRARY
|
||||
thd->net.no_send_ok= nsok;
|
||||
#endif
|
||||
if (sp->m_multi_results)
|
||||
{
|
||||
if (! smrx)
|
||||
thd->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
|
||||
}
|
||||
thd->server_status&= ~bits_to_be_cleared;
|
||||
|
||||
if (!res)
|
||||
send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 : thd->row_count_func));
|
||||
send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 :
|
||||
thd->row_count_func));
|
||||
else
|
||||
goto error; // Substatement should already have sent error
|
||||
}
|
||||
|
@ -6102,10 +6101,9 @@ bool multi_update_precheck(THD *thd, TABLE_LIST *tables)
|
|||
DBUG_PRINT("info",("Checking sub query list"));
|
||||
for (table= tables; table; table= table->next_global)
|
||||
{
|
||||
if (my_tz_check_n_skip_implicit_tables(&table,
|
||||
lex->time_zone_tables_used))
|
||||
continue;
|
||||
if (!table->table_in_first_from_clause && table->derived)
|
||||
if (!my_tz_check_n_skip_implicit_tables(&table,
|
||||
lex->time_zone_tables_used) &&
|
||||
!table->table_in_first_from_clause)
|
||||
{
|
||||
if (check_access(thd, SELECT_ACL, table->db,
|
||||
&table->grant.privilege, 0, 0) ||
|
||||
|
|
|
@ -905,10 +905,12 @@ static bool mysql_test_insert(Prepared_statement *stmt,
|
|||
{
|
||||
uint value_count;
|
||||
ulong counter= 0;
|
||||
Item *unused_conds= 0;
|
||||
|
||||
if ((res= mysql_prepare_insert(thd, table_list, table_list->table,
|
||||
fields, values, update_fields,
|
||||
update_values, duplic)))
|
||||
update_values, duplic,
|
||||
&unused_conds, FALSE)))
|
||||
goto error;
|
||||
|
||||
value_count= values->elements;
|
||||
|
@ -1381,18 +1383,21 @@ static int mysql_test_multidelete(Prepared_statement *stmt,
|
|||
1 error, sent to client
|
||||
-1 error, not sent to client
|
||||
*/
|
||||
|
||||
static int mysql_test_insert_select(Prepared_statement *stmt,
|
||||
TABLE_LIST *tables)
|
||||
{
|
||||
int res;
|
||||
LEX *lex= stmt->lex;
|
||||
TABLE_LIST *first_local_table;
|
||||
|
||||
if ((res= insert_precheck(stmt->thd, tables)))
|
||||
return res;
|
||||
TABLE_LIST *first_local_table=
|
||||
(TABLE_LIST *)lex->select_lex.table_list.first;
|
||||
first_local_table= (TABLE_LIST *)lex->select_lex.table_list.first;
|
||||
DBUG_ASSERT(first_local_table != 0);
|
||||
/* Skip first table, which is the table we are inserting in */
|
||||
lex->select_lex.table_list.first= (byte*) first_local_table->next_local;
|
||||
|
||||
/*
|
||||
insert/replace from SELECT give its SELECT_LEX for SELECT,
|
||||
and item_list belong to SELECT
|
||||
|
@ -1595,7 +1600,7 @@ static void cleanup_stmt_for_execute(Prepared_statement *stmt)
|
|||
{
|
||||
for (TABLE_LIST *tables= (TABLE_LIST*) sl->table_list.first;
|
||||
tables;
|
||||
tables= tables->next)
|
||||
tables= tables->next_global)
|
||||
{
|
||||
if (tables->table)
|
||||
tables->table->insert_values= 0;
|
||||
|
@ -1698,7 +1703,6 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
|
|||
|
||||
if (!error)
|
||||
error= check_prepared_statement(stmt, test(name));
|
||||
cleanup_stmt_for_execute(stmt);
|
||||
|
||||
/* restore to WAIT_PRIOR: QUERY_PRIOR is set inside alloc_query */
|
||||
if (!(specialflag & SPECIAL_NO_PRIOR))
|
||||
|
@ -1713,6 +1717,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length,
|
|||
lex_end(lex);
|
||||
thd->restore_backup_statement(stmt, &thd->stmt_backup);
|
||||
cleanup_items(stmt->free_list);
|
||||
cleanup_stmt_for_execute(stmt);
|
||||
close_thread_tables(thd);
|
||||
thd->rollback_item_tree_changes();
|
||||
thd->cleanup_after_query();
|
||||
|
@ -2057,9 +2062,9 @@ static void execute_stmt(THD *thd, Prepared_statement *stmt,
|
|||
cleanup_items(stmt->free_list);
|
||||
thd->rollback_item_tree_changes();
|
||||
reset_stmt_params(stmt);
|
||||
cleanup_stmt_for_execute(stmt);
|
||||
close_thread_tables(thd); // to close derived tables
|
||||
thd->set_statement(&thd->stmt_backup);
|
||||
cleanup_stmt_for_execute(stmt);
|
||||
thd->cleanup_after_query();
|
||||
|
||||
if (stmt->state == Item_arena::PREPARED)
|
||||
|
@ -2087,7 +2092,6 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
|
|||
int error;
|
||||
DBUG_ENTER("mysql_stmt_fetch");
|
||||
|
||||
thd->current_arena= stmt;
|
||||
if (!(stmt= thd->stmt_map.find(stmt_id)) ||
|
||||
!stmt->cursor ||
|
||||
!stmt->cursor->is_open())
|
||||
|
@ -2095,7 +2099,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
|
|||
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), stmt_id, "fetch");
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
thd->current_arena= stmt;
|
||||
thd->set_n_backup_statement(stmt, &thd->stmt_backup);
|
||||
stmt->cursor->init_thd(thd);
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#include "sp_head.h"
|
||||
#include "sql_trigger.h"
|
||||
#include "parse_file.h"
|
||||
#include "sql_acl.h"
|
||||
|
||||
|
||||
static const LEX_STRING triggers_file_type= {(char *)"TRIGGERS", 8};
|
||||
static const char * const triggers_file_ext= ".TRG";
|
||||
|
|
|
@ -620,9 +620,8 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
LEX *lex= thd->lex;
|
||||
ulong opened_tables;
|
||||
TABLE_LIST *table_list= lex->query_tables;
|
||||
TABLE_LIST *tl, *leaves;
|
||||
List<Item> *fields= &lex->select_lex.item_list;
|
||||
TABLE_LIST *tl;
|
||||
TABLE_LIST *leaves;
|
||||
table_map tables_for_update;
|
||||
int res;
|
||||
bool update_view= 0;
|
||||
|
@ -634,9 +633,10 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
uint table_count= lex->table_count;
|
||||
const bool using_lock_tables= thd->locked_tables != 0;
|
||||
bool original_multiupdate= (thd->lex->sql_command == SQLCOM_UPDATE_MULTI);
|
||||
DBUG_ENTER("mysql_multi_update_prepare");
|
||||
|
||||
/* following need for prepared statements, to run next time multi-update */
|
||||
thd->lex->sql_command= SQLCOM_UPDATE_MULTI;
|
||||
DBUG_ENTER("mysql_multi_update_prepare");
|
||||
|
||||
/* open tables and create derived ones, but do not lock and fill them */
|
||||
if ((original_multiupdate && open_tables(thd, table_list, & table_count)) ||
|
||||
|
@ -651,24 +651,7 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
if (setup_tables(thd, table_list, &lex->select_lex.where,
|
||||
&lex->select_lex.leaf_tables, FALSE, FALSE))
|
||||
DBUG_RETURN(TRUE);
|
||||
/*
|
||||
Ensure that we have update privilege for all tables and columns in the
|
||||
SET part
|
||||
*/
|
||||
for (tl= (leaves= lex->select_lex.leaf_tables); tl; tl= tl->next_leaf)
|
||||
{
|
||||
/*
|
||||
Update of derived tables is checked later
|
||||
We don't check privileges here, becasue then we would get error
|
||||
"UPDATE command denided .. for column N" instead of
|
||||
"Target table ... is not updatable"
|
||||
*/
|
||||
TABLE *table= tl->table;
|
||||
TABLE_LIST *tlist;
|
||||
if (!(tlist= tl->belong_to_view?tl->belong_to_view:tl)->derived)
|
||||
tlist->grant.want_privilege= table->grant.want_privilege=
|
||||
(UPDATE_ACL & ~table->grant.privilege);
|
||||
}
|
||||
leaves= lex->select_lex.leaf_tables;
|
||||
|
||||
if ((lex->select_lex.no_wrap_view_item= 1,
|
||||
res= setup_fields(thd, 0, table_list, *fields, 1, 0, 0),
|
||||
|
@ -698,11 +681,6 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
for (tl= leaves; tl; tl= tl->next_leaf)
|
||||
{
|
||||
TABLE *table= tl->table;
|
||||
TABLE_LIST *tlist= tl->belong_to_view?tl->belong_to_view:tl;
|
||||
|
||||
/* We only need SELECT privilege for columns in the values list */
|
||||
tlist->grant.want_privilege= table->grant.want_privilege=
|
||||
(SELECT_ACL & ~table->grant.privilege);
|
||||
/* Only set timestamp column if this is not modified */
|
||||
if (table->timestamp_field &&
|
||||
table->timestamp_field->query_id == thd->query_id)
|
||||
|
@ -730,26 +708,24 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
DBUG_PRINT("info",("setting table `%s` for update", tl->alias));
|
||||
tl->lock_type= lex->multi_lock_option;
|
||||
tl->updating= 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info",("setting table `%s` for read-only", tl->alias));
|
||||
tl->lock_type= TL_READ;
|
||||
tl->updating= 0;
|
||||
}
|
||||
if (!using_lock_tables)
|
||||
tl->table->reginfo.lock_type= tl->lock_type;
|
||||
|
||||
/* Check access privileges for table */
|
||||
if (!tl->derived)
|
||||
{
|
||||
TABLE_LIST *save= tl->next;
|
||||
bool res;
|
||||
tl->next= 0;
|
||||
res= (check_access(thd, tl->updating ? UPDATE_ACL : SELECT_ACL,
|
||||
tl->db, &tl->grant.privilege, 0, 0) ||
|
||||
(grant_option && check_grant(thd, wants, tl, 0, 0, 0)));
|
||||
tl->next= save;
|
||||
if (res)
|
||||
uint want_privilege= tl->updating ? UPDATE_ACL : SELECT_ACL;
|
||||
if (!using_lock_tables)
|
||||
tl->table->reginfo.lock_type= tl->lock_type;
|
||||
|
||||
if (check_access(thd, want_privilege,
|
||||
tl->db, &tl->grant.privilege, 0, 0) ||
|
||||
(grant_option && check_grant(thd, want_privilege, tl, 0, 1, 0)))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -806,6 +782,22 @@ bool mysql_multi_update_prepare(THD *thd)
|
|||
res))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
/* We only need SELECT privilege for columns in the values list */
|
||||
for (tl= leaves; tl; tl= tl->next_leaf)
|
||||
{
|
||||
TABLE *table= tl->table;
|
||||
TABLE_LIST *tlist;
|
||||
if (!(tlist= tl->belong_to_view ? tl->belong_to_view : tl)->derived)
|
||||
{
|
||||
tlist->grant.want_privilege=
|
||||
(SELECT_ACL & ~tlist->grant.privilege);
|
||||
table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege);
|
||||
}
|
||||
DBUG_PRINT("info", ("table: %s want_privilege: %u", tl->alias,
|
||||
(uint) table->grant.want_privilege));
|
||||
}
|
||||
|
||||
if (thd->fill_derived_tables() &&
|
||||
mysql_handle_derived(lex, &mysql_derived_filling))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "sql_acl.h"
|
||||
#include "sql_select.h"
|
||||
#include "parse_file.h"
|
||||
#include "sp.h"
|
||||
|
|
|
@ -5716,7 +5716,7 @@ expr_or_default:
|
|||
|
||||
opt_insert_update:
|
||||
/* empty */
|
||||
| ON DUPLICATE_SYM
|
||||
| ON DUPLICATE_SYM { Lex->duplicates= DUP_UPDATE; }
|
||||
KEY_SYM UPDATE_SYM insert_update_list
|
||||
;
|
||||
|
||||
|
@ -5759,6 +5759,8 @@ update_list:
|
|||
update_elem:
|
||||
simple_ident_nospvar equal expr_or_default
|
||||
{
|
||||
if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3))
|
||||
YYABORT;
|
||||
};
|
||||
|
||||
insert_update_list:
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <errno.h>
|
||||
#include <m_ctype.h>
|
||||
#include "md5.h"
|
||||
#include "sql_acl.h"
|
||||
|
||||
/* Functions defined in this file */
|
||||
|
||||
|
|
|
@ -277,7 +277,8 @@ static
|
|||
int my_strnncollsp_czech(CHARSET_INFO * cs,
|
||||
const uchar *s, uint slen,
|
||||
const uchar *t, uint tlen,
|
||||
my_bool diff_if_only_endspace_difference)
|
||||
my_bool diff_if_only_endspace_difference
|
||||
__attribute__((unused)))
|
||||
{
|
||||
for ( ; slen && s[slen-1] == ' ' ; slen--);
|
||||
for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
|
||||
|
|
|
@ -1360,7 +1360,8 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs,
|
|||
static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs,
|
||||
const uchar *s, uint slen,
|
||||
const uchar *t, uint tlen,
|
||||
my_bool diff_if_only_endspace_difference)
|
||||
my_bool diff_if_only_endspace_difference
|
||||
__attribute__((unused)))
|
||||
{
|
||||
/* TODO: Needs to be fixed to handle end space! */
|
||||
return my_strnncoll_ucs2_bin(cs,s,slen,t,tlen,0);
|
||||
|
|
|
@ -480,7 +480,8 @@ static
|
|||
int my_strnncollsp_win1250ch(CHARSET_INFO * cs,
|
||||
const uchar *s, uint slen,
|
||||
const uchar *t, uint tlen,
|
||||
my_bool diff_if_only_endspace_difference)
|
||||
my_bool diff_if_only_endspace_difference
|
||||
__attribute__((unused)))
|
||||
{
|
||||
for ( ; slen && s[slen-1] == ' ' ; slen--);
|
||||
for ( ; tlen && t[tlen-1] == ' ' ; tlen--);
|
||||
|
|
|
@ -135,7 +135,7 @@ static int my_xml_value(MY_XML_PARSER *st, const char *str, uint len)
|
|||
|
||||
static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len)
|
||||
{
|
||||
if ( (st->attrend-st->attr+len+1)>sizeof(st->attr))
|
||||
if ((uint) (st->attrend-st->attr+len+1) > sizeof(st->attr))
|
||||
{
|
||||
sprintf(st->errstr,"To deep XML");
|
||||
return MY_XML_ERROR;
|
||||
|
|
|
@ -705,8 +705,12 @@ static void verify_prepare_field(MYSQL_RES *result,
|
|||
as utf8. Field length is calculated as number of characters * maximum
|
||||
number of bytes a character can occupy.
|
||||
*/
|
||||
if (length)
|
||||
if (length && field->length != length * cs->mbmaxlen)
|
||||
{
|
||||
fprintf(stderr, "Expected field length: %d, got length: %d\n",
|
||||
(int) (length * cs->mbmaxlen), (int) field->length);
|
||||
DIE_UNLESS(field->length == length * cs->mbmaxlen);
|
||||
}
|
||||
if (def)
|
||||
DIE_UNLESS(strcmp(field->def, def) == 0);
|
||||
}
|
||||
|
@ -1419,7 +1423,9 @@ static void test_prepare_field_result()
|
|||
"t1", "test_prepare_field_result", current_db, 10, 0);
|
||||
verify_prepare_field(result, 3, "ts_c", "ts_c", MYSQL_TYPE_TIMESTAMP,
|
||||
"t1", "test_prepare_field_result", current_db, 19, 0);
|
||||
verify_prepare_field(result, 4, "char_c", "char_c", MYSQL_TYPE_VAR_STRING,
|
||||
verify_prepare_field(result, 4, "char_c", "char_c",
|
||||
(mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_VAR_STRING : MYSQL_TYPE_STRING),
|
||||
"t1", "test_prepare_field_result", current_db, 4, 0);
|
||||
|
||||
verify_field_count(result, 5);
|
||||
|
@ -7356,7 +7362,7 @@ static void test_explain_bug()
|
|||
verify_prepare_field(result, 0, "Field", "COLUMN_NAME",
|
||||
mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
|
||||
0, 0, "", 192, 0);
|
||||
0, 0, "", 64, 0);
|
||||
|
||||
verify_prepare_field(result, 1, "Type", "COLUMN_TYPE",
|
||||
MYSQL_TYPE_BLOB, 0, 0, "", 0, 0);
|
||||
|
@ -7364,22 +7370,22 @@ static void test_explain_bug()
|
|||
verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
|
||||
mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
|
||||
0, 0, "", 9, 0);
|
||||
0, 0, "", 3, 0);
|
||||
|
||||
verify_prepare_field(result, 3, "Key", "COLUMN_KEY",
|
||||
mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
|
||||
0, 0, "", 9, 0);
|
||||
0, 0, "", 3, 0);
|
||||
|
||||
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
|
||||
mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
|
||||
0, 0, "", 192, 0);
|
||||
0, 0, "", 64, 0);
|
||||
|
||||
verify_prepare_field(result, 5, "Extra", "EXTRA",
|
||||
mysql_get_server_version(mysql) <= 50000 ?
|
||||
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
|
||||
0, 0, "", 60, 0);
|
||||
0, 0, "", 20, 0);
|
||||
|
||||
mysql_free_result(result);
|
||||
mysql_stmt_close(stmt);
|
||||
|
@ -12171,6 +12177,8 @@ static void test_rewind(void)
|
|||
myquery(rc);
|
||||
rc= mysql_stmt_free_result(stmt);
|
||||
rc= mysql_stmt_close(stmt);
|
||||
}
|
||||
|
||||
|
||||
static void test_truncation()
|
||||
{
|
||||
|
|
|
@ -91,12 +91,7 @@ main(int argc __attribute__((unused)), char** argv)
|
|||
struct sockaddr_in sa_cli;
|
||||
int listen_sd;
|
||||
int err;
|
||||
|
||||
#if defined(__sgi) && _NO_XOPEN4 && _NO_XOPEN5
|
||||
socklen_t client_len;
|
||||
#else
|
||||
size_t client_len;
|
||||
#endif
|
||||
size_socket client_len;
|
||||
int reuseaddr = 1; /* better testing, uh? */
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
|
|
Loading…
Reference in a new issue