1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item.cc:
  SCCS merged
sql/item.h:
  SCCS merged
sql/lex.h:
  SCCS merged
sql/sql_lex.cc:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
This commit is contained in:
unknown
2003-01-09 17:56:57 +01:00
20 changed files with 1897 additions and 20 deletions

View File

@ -29,6 +29,9 @@
#include "ha_innodb.h"
#endif
#include "sp_head.h"
#include "sp.h"
#ifdef HAVE_OPENSSL
/*
Without SSL the handshake consists of one packet. This packet
@ -2808,6 +2811,84 @@ mysql_execute_command(THD *thd)
res= -1;
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_STATUS_NO_TRANS_UPDATE);
break;
case SQLCOM_CREATE_PROCEDURE:
if (!lex->sphead)
res= -1;
else
{
res= lex->sphead->create(thd);
if (res < 0)
{
// QQ Error!
}
send_ok(thd);
}
break;
case SQLCOM_CALL:
{
Item_string *s;
sp_head *sp;
s= (Item_string*)lex->value_list.head();
sp= sp_find(thd, s);
if (! sp)
{
// QQ Error!
res= -1;
}
else
{
res= sp->execute(thd);
if (res == 0)
send_ok(thd);
}
}
break;
case SQLCOM_ALTER_PROCEDURE:
{
Item_string *s;
sp_head *sp;
s= (Item_string*)lex->value_list.head();
sp= sp_find(thd, s);
if (! sp)
{
// QQ Error!
res= -1;
}
else
{
/* QQ This is an no-op right now, since we haven't
put the characteristics in yet. */
send_ok(thd);
}
}
break;
case SQLCOM_DROP_PROCEDURE:
{
Item_string *s;
sp_head *sp;
s = (Item_string*)lex->value_list.head();
sp = sp_find(thd, s);
if (! sp)
{
// QQ Error!
res= -1;
}
else
{
String *name = s->const_string();
res= sp_drop(thd, name->c_ptr(), name->length());
if (res < 0)
{
// QQ Error!
}
send_ok(thd);
}
}
break;
default: /* Impossible */
send_ok(thd);
break;