Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2080 06/01/19 21:54:09 andrey@lmy004. +13 -0
fix for bug#16642 (Events: No INFORMATION_SCHEMA.EVENTS table)
Implements also SHOW EVENTS [FROM db] [LIKE pattern]
WL#1034 (Internal CRON)
sql/table.h
1.126 06/01/19 21:53:59 andrey@lmy004. +1 -0
- add an enum value for I_S.EVENTS
sql/sql_yacc.yy
1.441 06/01/19 21:53:59 andrey@lmy004. +9 -0
- introduce SHOW EVENTS
sql/sql_show.cc
1.294 06/01/19 21:53:59 andrey@lmy004. +194 -0
- introduce I_S.EVENTS and SHOW EVENTS
(fix for bug #16642)
The table structure is :
{"EVENT_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
{"EVENT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"},
{"EVENT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"},
{"EVENT_BODY", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
{"EVENT_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
{"EVENT_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"},
{"EXECUTE_AT", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Execute at"},
{"INTERVAL", 11, MYSQL_TYPE_LONG, 0, 1, "Interval"},
{"INTERVAL_TYPE", 18, MYSQL_TYPE_STRING, 0, 1, "Interval type"},
{"STARTS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Starts"},
{"ENDS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Ends"},
{"STATUS", 8, MYSQL_TYPE_STRING, 0, 0, "Status"},
{"ON_COMPLETION", 12, MYSQL_TYPE_STRING, 0, 0, 0},
{"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
{"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
{"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
{"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
{"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"},
sql/sql_parse.cc
1.511 06/01/19 21:53:59 andrey@lmy004. +1 -0
add a case for SCH_EVENTS
(introducing I_S.EVENTS)
sql/sql_lex.h
1.212 06/01/19 21:53:59 andrey@lmy004. +1 -1
add a new command SHOW EVENTS
sql/mysqld.cc
1.521 06/01/19 21:53:59 andrey@lmy004. +1 -0
- add variable for SQLCOM_SHOW_EVENTS
sql/event_timed.cc
1.18 06/01/19 21:53:59 andrey@lmy004. +1 -2
the statement fits on one line, put it on one line
sql/event_priv.h
1.14 06/01/19 21:53:58 andrey@lmy004. +0 -23
- moved enum evex_table_field to event.h
- moved evex_open_event_table() to event.h
sql/event.h
1.14 06/01/19 21:53:58 andrey@lmy004. +28 -3
- make evex_table_field public to be used in sql_show.cc
- make last_executed public to be used in sql_show.cc
- make evex_open_event_table() public outside of the scheduler
to be used in sql_show.cc for I_S.EVENTS
- export sortcmp_lex_string to be used in sql_parse.cc in
fill_schema_events()
sql/event.cc
1.21 06/01/19 21:53:58 andrey@lmy004. +6 -1
- make execute_at and (interval_expr && interval_field) mutually exclusive
(this fixes possible bug during execution)
mysql-test/r/information_schema_db.result
1.10 06/01/19 21:53:58 andrey@lmy004. +1 -0
fix the result because of I_S.EVENTS
mysql-test/r/information_schema.result
1.104 06/01/19 21:53:58 andrey@lmy004. +9 -2
fix result because of I_S.EVENTS
include/mysql_time.h
1.5 06/01/19 21:53:58 andrey@lmy004. +4 -0
add a note
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: andrey
# Host: lmy004.
# Root: /work/mysql-5.1-events_i_s
--- 1.520/sql/mysqld.cc 2006-01-19 03:56:00 +01:00
+++ 1.521/sql/mysqld.cc 2006-01-19 21:53:59 +01:00
@@ -6699,6 +6699,7 @@
{"Com_show_engine_logs", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_LOGS]), SHOW_LONG_STATUS},
{"Com_show_engine_mutex", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_MUTEX]), SHOW_LONG_STATUS},
{"Com_show_engine_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ENGINE_STATUS]), SHOW_LONG_STATUS},
+ {"Com_show_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_EVENTS]), SHOW_LONG_STATUS},
{"Com_show_errors", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_ERRORS]), SHOW_LONG_STATUS},
{"Com_show_fields", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_FIELDS]), SHOW_LONG_STATUS},
{"Com_show_grants", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
--- 1.211/sql/sql_lex.h 2006-01-17 08:37:27 +01:00
+++ 1.212/sql/sql_lex.h 2006-01-19 21:53:59 +01:00
@@ -99,7 +99,7 @@
SQLCOM_SHOW_AUTHORS, SQLCOM_BINLOG_BASE64_EVENT,
SQLCOM_SHOW_PLUGINS,
SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT, SQLCOM_DROP_EVENT,
- SQLCOM_SHOW_CREATE_EVENT,
+ SQLCOM_SHOW_CREATE_EVENT, SQLCOM_SHOW_EVENTS,
/* This should be the last !!! */
--- 1.510/sql/sql_parse.cc 2006-01-19 03:56:01 +01:00
+++ 1.511/sql/sql_parse.cc 2006-01-19 21:53:59 +01:00
@@ -2168,6 +2168,7 @@
case SCH_TABLES:
case SCH_VIEWS:
case SCH_TRIGGERS:
+ case SCH_EVENTS:
#ifdef DONT_ALLOW_SHOW_COMMANDS
my_message(ER_NOT_ALLOWED_COMMAND,
ER(ER_NOT_ALLOWED_COMMAND), MYF(0)); /* purecov: inspected */
--- 1.293/sql/sql_show.cc 2006-01-19 03:56:01 +01:00
+++ 1.294/sql/sql_show.cc 2006-01-19 21:53:59 +01:00
@@ -25,6 +25,7 @@
#include "sp_head.h"
#include "sql_trigger.h"
#include "authors.h"
+#include "event.h"
#include <my_dir.h>
#ifdef WITH_PARTITION_STORAGE_ENGINE
@@ -1901,6 +1902,7 @@
case SQLCOM_SHOW_TABLES:
case SQLCOM_SHOW_TABLE_STATUS:
case SQLCOM_SHOW_TRIGGERS:
+ case SQLCOM_SHOW_EVENTS:
index_field_values->db_value= lex->select_lex.db;
index_field_values->table_value= wild;
break;
@@ -3770,6 +3772,171 @@
}
+static
+TIME ulonglong_to_TIME(ulonglong t)
+{
+ TIME ret;
+ unsigned int *tmp= ((unsigned int *)(((char*)&ret)+offsetof(TIME,second))) + 1;
+ int i= 5;
+
+ bzero(&ret, sizeof(TIME));
+ do
+ {
+ *(--tmp)= t % 100;
+ t/=100;
+ } while (--i > 0);
+ ret.year= t;
+ ret.time_type= MYSQL_TIMESTAMP_DATETIME;
+
+ return ret;
+}
+
+
+int fill_schema_events(THD *thd, TABLE_LIST *tables, COND *cond)
+{
+ const char *wild= thd->lex->wild ? thd->lex->wild->ptr() : NullS;
+ TABLE *table= tables->table;
+ CHARSET_INFO *scs= system_charset_info;
+ TABLE *event_table= NULL;
+ event_timed *et= NULL;
+ Open_tables_state backup;
+ int ret=0;
+ LEX_STRING the_db={thd->lex->select_lex.db, strlen(thd->lex->select_lex.db)};
+
+ DBUG_ENTER("fill_schema_events");
+
+ thd->reset_n_backup_open_tables_state(&backup);
+
+ if ((ret= evex_open_event_table(thd, TL_READ, &event_table)))
+ {
+ sql_print_error("Table mysql.event is damaged.");
+ ret= 1;
+ goto err;
+ }
+
+ event_table->file->ha_index_init(0, 1);
+ if ((ret= event_table->file->index_first(event_table->record[0])))
+ {
+ ret= (ret == HA_ERR_END_OF_FILE) ? 0 : 1;
+ goto err;
+ }
+
+ do
+ {
+ TIME time;
+ restore_record(table, s->default_values);
+ et= new event_timed;
+ if (et->load_from_row(thd->mem_root, event_table))
+ {
+ my_error(ER_EVENT_CANNOT_LOAD_FROM_TABLE, MYF(0));
+ ret= 1;
+ goto err;
+ }
+ if (sortcmp_lex_string(et->dbname, the_db, system_charset_info))
+ continue;
+
+ if (!(!wild || !wild[0] || !wild_compare(et->name.str, wild, 0)))
+ continue;
+
+ //->field[0] is EVENT_CATALOG and is by default NULL
+
+ table->field[1]->store(et->dbname.str, et->dbname.length, scs);
+ table->field[2]->store(et->name.str, et->name.length, scs);
+ table->field[3]->store(et->body.str, et->body.length, scs);
+
+ // create event...
+ table->field[4]->store(STRING_WITH_LEN("NOT IMPLEMENTED"), scs);
+
+ if (et->expression)
+ {
+ char *p;
+ //type
+ table->field[5]->store(STRING_WITH_LEN("RECURRING"), scs);
+ //execute_at
+ table->field[6]->set_null();
+ //interval type
+ if ((p= get_field(thd->mem_root,
+ event_table->field[EVEX_FIELD_TRANSIENT_INTERVAL])) == NullS)
+ {
+ my_error(ER_OUTOFMEMORY, MYF(0), 10);
+ ret= 1;
+ goto err;
+ }
+ //interval_type
+ table->field[7]->set_notnull();
+ table->field[7]->store((longlong)et->expression);
+ table->field[8]->set_notnull();
+ table->field[8]->store(p, strlen(p), scs);
+
+ table->field[9]->set_notnull();
+ table->field[9]->store_time(&et->starts, MYSQL_TIMESTAMP_DATETIME);
+ table->field[10]->set_notnull();
+ table->field[10]->store_time(&et->ends, MYSQL_TIMESTAMP_DATETIME);
+ }
+ else
+ {
+ //type
+ table->field[5]->store(STRING_WITH_LEN("ONE TIME"), scs);
+ //execute_at
+ table->field[6]->set_notnull();
+ table->field[6]->store_time(&et->execute_at, MYSQL_TIMESTAMP_DATETIME);
+ //interval
+ table->field[7]->set_null();
+ //interval_type
+ table->field[8]->set_null();
+
+ table->field[9]->set_null();
+ table->field[10]->set_null();
+ }
+
+ //status
+ if (et->status == MYSQL_EVENT_ENABLED)
+ table->field[11]->store(STRING_WITH_LEN("ENABLED"), scs);
+ else
+ table->field[11]->store(STRING_WITH_LEN("DISABLED"), scs);
+
+ //on_completion
+ if (et->on_completion == MYSQL_EVENT_ON_COMPLETION_DROP)
+ table->field[12]->store(STRING_WITH_LEN("NOT PRESERVE"), scs);
+ else
+ table->field[12]->store(STRING_WITH_LEN("PRESERVE"), scs);
+
+ time= ulonglong_to_TIME(et->created);
+ table->field[13]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
+ time= ulonglong_to_TIME(et->modified);
+ table->field[14]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
+ if (et->last_executed.year)
+ table->field[15]->store_time(&et->last_executed, MYSQL_TIMESTAMP_DATETIME);
+ else
+ table->field[15]->set_null();
+
+ table->field[16]->store(et->comment.str, et->comment.length, scs);
+
+ table->field[17]->store(et->definer.str, et->definer.length, scs);
+
+ if ((ret=schema_table_store_record(thd, table)))
+ {
+ DBUG_PRINT("fill_schema_events",("schema_table_store_record ret %d",ret))
+ ret= 1;
+ goto err;
+ }
+ delete et;
+ et= NULL;
+ } while (!event_table->file->index_next(event_table->record[0]));
+
+ ret= 0;
+err:
+ if (event_table)
+ {
+ event_table->file->ha_index_end();
+ close_thread_tables(thd);
+ }
+ delete et;
+ thd->restore_backup_open_tables_state(&backup);
+ DBUG_RETURN(ret);
+}
+
+
int fill_open_tables(THD *thd, TABLE_LIST *tables, COND *cond)
{
DBUG_ENTER("fill_open_tables");
@@ -4390,6 +4557,31 @@
};
+ST_FIELD_INFO events_fields_info[]=
+{
+ {"EVENT_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0},
+ {"EVENT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"},
+ {"EVENT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"},
+ {"EVENT_BODY", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"EVENT_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"EVENT_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"},
+ {"EXECUTE_AT", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Execute at"},
+ {"INTERVAL", 11, MYSQL_TYPE_LONG, 0, 1, "Interval"},
+ {"INTERVAL_TYPE", 18, MYSQL_TYPE_STRING, 0, 1, "Interval type"},
+ {"STARTS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Starts"},
+ {"ENDS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Ends"},
+ {"STATUS", 8, MYSQL_TYPE_STRING, 0, 0, "Status"},
+ {"ON_COMPLETION", 12, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
+ {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
+ {"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
+ {"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"},
+ {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
+};
+
+
+
ST_FIELD_INFO coll_charset_app_fields_info[]=
{
{"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0},
@@ -4655,6 +4847,8 @@
fill_schema_column_privileges, 0, 0, -1, -1, 0},
{"ENGINES", engines_fields_info, create_schema_table,
fill_schema_engines, make_old_format, 0, -1, -1, 0},
+ {"EVENTS", events_fields_info, create_schema_table,
+ fill_schema_events, make_old_format, 0, -1, -1, 0},
{"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0},
{"OPEN_TABLES", open_tables_fields_info, create_schema_table,
--- 1.440/sql/sql_yacc.yy 2006-01-18 22:18:37 +01:00
+++ 1.441/sql/sql_yacc.yy 2006-01-19 21:53:59 +01:00
@@ -8041,6 +8041,15 @@
if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS))
YYABORT;
}
+ | opt_full EVENTS_SYM opt_db wild_and_where
+ {
+ LEX *lex= Lex;
+ lex->sql_command= SQLCOM_SELECT;
+ lex->orig_sql_command= SQLCOM_SHOW_EVENTS;
+ lex->select_lex.db= $3;
+ if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS))
+ YYABORT;
+ }
| TABLE_SYM STATUS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
--- 1.125/sql/table.h 2006-01-19 03:56:01 +01:00
+++ 1.126/sql/table.h 2006-01-19 21:53:59 +01:00
@@ -338,6 +338,7 @@
SCH_COLUMNS,
SCH_COLUMN_PRIVILEGES,
SCH_ENGINES,
+ SCH_EVENTS,
SCH_KEY_COLUMN_USAGE,
SCH_OPEN_TABLES,
SCH_PARTITIONS,
--- 1.20/sql/event.cc 2006-01-11 12:49:43 +01:00
+++ 1.21/sql/event.cc 2006-01-19 21:53:58 +01:00
@@ -77,7 +77,7 @@
}
-static
+
int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs)
{
return cs->coll->strnncollsp(cs, (unsigned char *) s.str,s.length,
@@ -283,10 +283,15 @@
from 1. Thus +1 offset is needed!
*/
table->field[EVEX_FIELD_TRANSIENT_INTERVAL]->store((longlong)et->interval+1);
+
+ table->field[EVEX_FIELD_EXECUTE_AT]->set_null();
}
else if (et->execute_at.year)
{
// fix_fields already called in init_execute_at
+ table->field[EVEX_FIELD_INTERVAL_EXPR]->set_null();
+ table->field[EVEX_FIELD_TRANSIENT_INTERVAL]->set_null();
+
table->field[EVEX_FIELD_EXECUTE_AT]->set_notnull();
table->field[EVEX_FIELD_EXECUTE_AT]->store_time(&et->execute_at,
MYSQL_TIMESTAMP_DATETIME);
--- 1.13/sql/event.h 2006-01-13 07:26:34 +01:00
+++ 1.14/sql/event.h 2006-01-19 21:53:58 +01:00
@@ -54,6 +54,25 @@
MYSQL_EVENT_DISABLED
};
+enum evex_table_field
+{
+ EVEX_FIELD_DB = 0,
+ EVEX_FIELD_NAME,
+ EVEX_FIELD_BODY,
+ EVEX_FIELD_DEFINER,
+ EVEX_FIELD_EXECUTE_AT,
+ EVEX_FIELD_INTERVAL_EXPR,
+ EVEX_FIELD_TRANSIENT_INTERVAL,
+ EVEX_FIELD_CREATED,
+ EVEX_FIELD_MODIFIED,
+ EVEX_FIELD_LAST_EXECUTED,
+ EVEX_FIELD_STARTS,
+ EVEX_FIELD_ENDS,
+ EVEX_FIELD_STATUS,
+ EVEX_FIELD_ON_COMPLETION,
+ EVEX_FIELD_COMMENT,
+ EVEX_FIELD_COUNT /* a cool trick to count the number of fields :) */
+} ;
class event_timed
{
@@ -64,9 +83,10 @@
bool status_changed;
bool last_executed_changed;
- TIME last_executed;
public:
+ TIME last_executed;
+
LEX_STRING dbname;
LEX_STRING name;
LEX_STRING body;
@@ -83,8 +103,8 @@
longlong expression;
interval_type interval;
- longlong created;
- longlong modified;
+ ulonglong created;
+ ulonglong modified;
enum enum_event_on_completion on_completion;
enum enum_event_status status;
sp_head *sphead;
@@ -197,6 +217,10 @@
evex_drop_event(THD *thd, event_timed *et, bool drop_if_exists,
uint *rows_affected);
+int
+evex_open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table);
+
+int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs);
int
init_events();
@@ -208,6 +232,7 @@
// auxiliary
int
event_timed_compare(event_timed **a, event_timed **b);
+
/*
--- 1.13/sql/event_priv.h 2005-12-28 17:28:41 +01:00
+++ 1.14/sql/event_priv.h 2006-01-19 21:53:58 +01:00
@@ -24,26 +24,6 @@
#define UNLOCK_MUTEX_AND_BAIL_OUT(__mutex, __label) \
{ VOID(pthread_mutex_unlock(&__mutex)); goto __label; }
-enum evex_table_field
-{
- EVEX_FIELD_DB = 0,
- EVEX_FIELD_NAME,
- EVEX_FIELD_BODY,
- EVEX_FIELD_DEFINER,
- EVEX_FIELD_EXECUTE_AT,
- EVEX_FIELD_INTERVAL_EXPR,
- EVEX_FIELD_TRANSIENT_INTERVAL,
- EVEX_FIELD_CREATED,
- EVEX_FIELD_MODIFIED,
- EVEX_FIELD_LAST_EXECUTED,
- EVEX_FIELD_STARTS,
- EVEX_FIELD_ENDS,
- EVEX_FIELD_STATUS,
- EVEX_FIELD_ON_COMPLETION,
- EVEX_FIELD_COMMENT,
- EVEX_FIELD_COUNT /* a cool trick to count the number of fields :) */
-} ;
-
#define EVEX_DB_FIELD_LEN 64
#define EVEX_NAME_FIELD_LEN 64
@@ -54,9 +34,6 @@
evex_db_find_event_aux(THD *thd, const LEX_STRING dbname,
const LEX_STRING rname, TABLE *table);
-int
-evex_open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table);
-
int
event_timed_compare_q(void *vptr, byte* a, byte *b);
--- 1.17/sql/event_timed.cc 2006-01-12 16:51:19 +01:00
+++ 1.18/sql/event_timed.cc 2006-01-19 21:53:59 +01:00
@@ -475,8 +475,7 @@
goto error;
DBUG_PRINT("load_from_row", ("Event [%s] is [%s]", et->name.str, ptr));
- et->status= (ptr[0]=='E'? MYSQL_EVENT_ENABLED:
- MYSQL_EVENT_DISABLED);
+ et->status= (ptr[0]=='E'? MYSQL_EVENT_ENABLED:MYSQL_EVENT_DISABLED);
// ToDo : Andrey . Find a way not to allocate ptr on event_mem_root
if ((ptr= get_field(mem_root,
--- 1.103/mysql-test/r/information_schema.result 2006-01-19 03:55:59 +01:00
+++ 1.104/mysql-test/r/information_schema.result 2006-01-19 21:53:58 +01:00
@@ -44,6 +44,7 @@
COLUMNS
COLUMN_PRIVILEGES
ENGINES
+EVENTS
KEY_COLUMN_USAGE
PARTITIONS
PLUGINS
@@ -734,7 +735,7 @@
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*)
-109
+110
drop view a2, a1;
drop table t_crashme;
select table_schema,table_name, column_name from
@@ -742,6 +743,8 @@
where data_type = 'longtext';
table_schema table_name column_name
information_schema COLUMNS COLUMN_TYPE
+information_schema EVENTS EVENT_BODY
+information_schema EVENTS EVENT_DEFINITION
information_schema PARTITIONS PARTITION_EXPRESSION
information_schema PARTITIONS SUBPARTITION_EXPRESSION
information_schema PARTITIONS PARTITION_DESCRIPTION
@@ -756,6 +759,10 @@
select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime';
table_name column_name data_type
+EVENTS EXECUTE_AT datetime
+EVENTS CREATED datetime
+EVENTS LAST_ALTERED datetime
+EVENTS LAST_EXECUTED datetime
PARTITIONS CREATE_TIME datetime
PARTITIONS UPDATE_TIME datetime
PARTITIONS CHECK_TIME datetime
@@ -817,7 +824,7 @@
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*)
cluster_replication 1
-information_schema 19
+information_schema 20
mysql 21
create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row
--- 1.9/mysql-test/r/information_schema_db.result 2006-01-10 16:42:19 +01:00
+++ 1.10/mysql-test/r/information_schema_db.result 2006-01-19 21:53:58 +01:00
@@ -7,6 +7,7 @@
COLUMNS
COLUMN_PRIVILEGES
ENGINES
+EVENTS
KEY_COLUMN_USAGE
PARTITIONS
PLUGINS
--- 1.4/include/mysql_time.h 2004-11-15 13:44:25 +01:00
+++ 1.5/include/mysql_time.h 2006-01-19 21:53:58 +01:00
@@ -44,6 +44,10 @@
There is one exception to this rule though if this structure holds time
value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
bigger values.
+
+ Warn: if you change the order of year, month, day, hour, minute, second
+ fix ulonglong_to_TIME() in sql_show.cc . It relies on the current
+ order and type being unsigned int.
*/
typedef struct st_mysql_time
{
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2080) BUG#16642 | ahristov | 19 Jan |