Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
26955036
Commit
26955036
authored
Feb 12, 2004
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
parents
f9e73c77
a8f0a8be
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
105 deletions
+77
-105
mysql-test/r/show_check.result
mysql-test/r/show_check.result
+0
-1
mysql-test/r/status.result
mysql-test/r/status.result
+1
-1
sql/sql_lex.cc
sql/sql_lex.cc
+0
-32
sql/sql_yacc.yy
sql/sql_yacc.yy
+76
-71
No files found.
mysql-test/r/show_check.result
View file @
26955036
...
...
@@ -144,7 +144,6 @@ insert into t1 values (1);
show open tables;
Database Table In_use Name_locked
test t1 0 0
mysql proc 0 0
drop table t1;
create table t1 (a int not null, b VARCHAR(10), INDEX (b) ) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
show create table t1;
...
...
mysql-test/r/status.result
View file @
26955036
...
...
@@ -14,6 +14,6 @@ update t1 set n = 3;
unlock tables;
show status like 'Table_lock%';
Variable_name Value
Table_locks_immediate
4
Table_locks_immediate
3
Table_locks_waited 1
drop table t1;
sql/sql_lex.cc
View file @
26955036
...
...
@@ -168,38 +168,6 @@ static int find_keyword(LEX *lex, uint len, bool function)
lex
->
yylval
->
symbol
.
length
=
len
;
return
symbol
->
tok
;
}
LEX_STRING
ls
;
ls
.
str
=
(
char
*
)
tok
;
ls
.
length
=
len
;
if
(
function
&&
sp_function_exists
(
current_thd
,
&
ls
))
// QQ temp fix
{
lex
->
safe_to_cache_query
=
0
;
lex
->
yylval
->
lex_str
.
str
=
lex
->
thd
->
strmake
((
char
*
)
lex
->
tok_start
,
len
);
lex
->
yylval
->
lex_str
.
length
=
len
;
return
SP_FUNC
;
}
#ifdef HAVE_DLOPEN
udf_func
*
udf
;
if
(
function
&&
using_udf_functions
&&
(
udf
=
find_udf
((
char
*
)
tok
,
len
)))
{
lex
->
safe_to_cache_query
=
0
;
lex
->
yylval
->
udf
=
udf
;
switch
(
udf
->
returns
)
{
case
STRING_RESULT
:
return
(
udf
->
type
==
UDFTYPE_FUNCTION
)
?
UDF_CHAR_FUNC
:
UDA_CHAR_SUM
;
case
REAL_RESULT
:
return
(
udf
->
type
==
UDFTYPE_FUNCTION
)
?
UDF_FLOAT_FUNC
:
UDA_FLOAT_SUM
;
case
INT_RESULT
:
return
(
udf
->
type
==
UDFTYPE_FUNCTION
)
?
UDF_INT_FUNC
:
UDA_INT_SUM
;
case
ROW_RESULT
:
default:
// This case should never be choosen
DBUG_ASSERT
(
0
);
return
0
;
}
}
#endif
return
0
;
}
...
...
sql/sql_yacc.yy
View file @
26955036
...
...
@@ -568,17 +568,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token SECOND_SYM
%token SECOND_MICROSECOND_SYM
%token SHARE_SYM
%token SP_FUNC
%token SUBDATE_SYM
%token SUBSTRING
%token SUBSTRING_INDEX
%token TRIM
%token UDA_CHAR_SUM
%token UDA_FLOAT_SUM
%token UDA_INT_SUM
%token UDF_CHAR_FUNC
%token UDF_FLOAT_FUNC
%token UDF_INT_FUNC
%token UNIQUE_USERS
%token UNIX_TIMESTAMP
%token USER
...
...
@@ -640,7 +633,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
LEX_HOSTNAME ULONGLONG_NUM field_ident select_alias ident ident_or_text
UNDERSCORE_CHARSET IDENT_sys TEXT_STRING_sys TEXT_STRING_literal
NCHAR_STRING opt_component key_cache_name
SP_FUNC ident_or_spfunc
sp_opt_label
sp_opt_label
%type <lex_str_ptr>
opt_table_alias
...
...
@@ -683,7 +676,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
simple_ident_nospvar simple_ident_q
%type <item_list>
expr_list
sp_expr_list
udf_expr_list udf_expr_list2 when_list
expr_list udf_expr_list udf_expr_list2 when_list
ident_list ident_list_arg
%type <key_type>
...
...
@@ -701,10 +694,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%type <table_list>
join_table_list join_table
%type <udf>
UDF_CHAR_FUNC UDF_FLOAT_FUNC UDF_INT_FUNC
UDA_CHAR_SUM UDA_FLOAT_SUM UDA_INT_SUM
%type <date_time_type> date_time_type;
%type <interval> interval
...
...
@@ -1030,7 +1019,7 @@ create:
lex->name=$4.str;
lex->create_info.options=$3;
}
| CREATE udf_func_type FUNCTION_SYM
ident_or_spfunc
| CREATE udf_func_type FUNCTION_SYM
IDENT_sys
{
LEX *lex=Lex;
lex->udf.name = $4;
...
...
@@ -1098,11 +1087,6 @@ create:
}
;
ident_or_spfunc:
IDENT_sys { $$= $1; }
| SP_FUNC { $$= $1; }
;
create_function_tail:
RETURNS_SYM udf_type UDF_SONAME_SYM TEXT_STRING_sys
{
...
...
@@ -1219,7 +1203,7 @@ sp_suid:
;
call:
CALL_SYM
ident_or_spfunc
CALL_SYM
IDENT_sys
{
LEX *lex = Lex;
...
...
@@ -3921,55 +3905,80 @@ simple_expr:
{ $$= new Item_func_round($3,$5,1); }
| TRUE_SYM
{ $$= new Item_int((char*) "TRUE",1,1); }
| SP_FUNC '(' sp_expr_list ')'
| IDENT_sys '(' udf_expr_list ')'
{
if (sp_function_exists(YYTHD, &$1))
{
sp_add_fun_to_lex(Lex, $1);
LEX *lex= Lex;
sp_add_fun_to_lex(lex, $1);
if ($3)
$$= new Item_func_sp($1, *$3);
else
$$= new Item_func_sp($1);
}
| UDA_CHAR_SUM '(' udf_expr_list ')'
else
{
#ifdef HAVE_DLOPEN
udf_func *udf;
if (using_udf_functions && (udf=find_udf($1.str, $1.length)))
{
switch (udf->returns) {
case STRING_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
if ($3 != NULL)
$$ = new Item_sum_udf_str($1
, *$3);
$$ = new Item_func_udf_str(udf
, *$3);
else
$$ = new Item_sum_udf_str($1
);
$$ = new Item_func_udf_str(udf
);
}
| UDA_FLOAT_SUM '(' udf_expr_list ')'
else
{
if ($3 != NULL)
$$ = new Item_sum_udf_float($1
, *$3);
$$ = new Item_sum_udf_str(udf
, *$3);
else
$$ = new Item_sum_udf_float($1
);
$$ = new Item_sum_udf_str(udf
);
}
| UDA_INT_SUM '(' udf_expr_list ')'
break;
case REAL_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
if ($3 != NULL)
$$ = new Item_sum_udf_int($1
, *$3);
$$ = new Item_func_udf_float(udf
, *$3);
else
$$ = new Item_sum_udf_int($1
);
$$ = new Item_func_udf_float(udf
);
}
| UDF_CHAR_FUNC '(' udf_expr_list ')'
else
{
if ($3 != NULL)
$$ = new Item_func_udf_str($1
, *$3);
$$ = new Item_sum_udf_float(udf
, *$3);
else
$$ = new Item_func_udf_str($1
);
$$ = new Item_sum_udf_float(udf
);
}
| UDF_FLOAT_FUNC '(' udf_expr_list ')'
break;
case INT_RESULT:
if (udf->type == UDFTYPE_FUNCTION)
{
if ($3 != NULL)
$$ = new Item_func_udf_float($1
, *$3);
$$ = new Item_func_udf_int(udf
, *$3);
else
$$ = new Item_func_udf_float($1
);
$$ = new Item_func_udf_int(udf
);
}
| UDF_INT_FUNC '(' udf_expr_list ')'
else
{
if ($3 != NULL)
$$ = new Item_func_udf_int($1
, *$3);
$$ = new Item_sum_udf_int(udf
, *$3);
else
$$ = new Item_func_udf_int($1);
$$ = new Item_sum_udf_int(udf);
}
break;
default:
YYABORT;
}
}
#endif /* HAVE_DLOPEN */
}
}
| UNIQUE_USERS '(' text_literal ',' NUM ',' NUM ',' expr_list ')'
{
...
...
@@ -4077,10 +4086,6 @@ fulltext_options:
| IN_SYM BOOLEAN_SYM MODE_SYM { $$= FT_BOOL; }
;
sp_expr_list:
/* empty */ { $$= NULL; }
| expr_list { $$= $1;};
udf_expr_list:
/* empty */ { $$= NULL; }
| udf_expr_list2 { $$= $1;}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment