summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-14 02:39:07 +0300
committerunknown <monty@donna.mysql.com>2000-09-14 02:39:07 +0300
commitd5964ba20ca4c00a443c185186def44bb90831b3 (patch)
tree47d3199e561726437875c3247556ac5797525366 /sql/sql_yacc.yy
parent9e37676d7cd9ca30a05025b9fcc3424c4e4a1932 (diff)
downloadmariadb-git-d5964ba20ca4c00a443c185186def44bb90831b3.tar.gz
Fixes for MERGE TABLES and HEAP tables
Docs/manual.texi: Updated MERGE table stuff + more extra/perror.c: Added missing error messages include/myisammrg.h: Fixes for MERGE TABLE include/queues.h: Fixes for MERGE TABLE isam/isamlog.c: Fixed hard bug myisam/mi_log.c: cleanup myisam/mi_open.c: Fixed file name format in myisam log myisam/myisamlog.c: Bug fixes myisammrg/mymrgdef.h: Fixes for MERGE TABLE myisammrg/myrg_create.c: Fixes for MERGE TABLE myisammrg/myrg_open.c: Fixes for MERGE TABLE myisammrg/myrg_queue.c: Fixes for MERGE TABLE myisammrg/myrg_rfirst.c: Fixes for MERGE TABLE myisammrg/myrg_rkey.c: Fixes for MERGE TABLE myisammrg/myrg_rlast.c: Fixes for MERGE TABLE myisammrg/myrg_rnext.c: Fixes for MERGE TABLE myisammrg/myrg_rprev.c: Fixes for MERGE TABLE myisammrg/myrg_rrnd.c: Fixes for MERGE TABLE mysql.proj: update mysys/queues.c: Fixed bug when using reverse queues sql-bench/test-insert.sh: Separated some things to get better timings sql/ha_heap.cc: Fixed heap table bug sql/ha_heap.h: Fixed heap table bug sql/ha_myisam.h: Fixed wrong max_keys sql/ha_myisammrg.cc: Fixed MERGE TABLES sql/ha_myisammrg.h: Fixed MERGE TABLES sql/handler.h: Fix for MERGE TABLES and HEAP tables sql/lex.h: Fixed MERGE TABLES sql/mysql_priv.h: Cleanup of code sql/sql_acl.cc: Fixed that privilege tables are flushed at start sql/sql_lex.h: Fixed MERGE TABLES sql/sql_parse.cc: Fixed MERGE TABLES sql/sql_select.cc: Fixes for HEAP tables sql/sql_table.cc: Cleanup sql/sql_yacc.yy: Fixed MERGE TABLES
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d4fec1289ba..e6952741b60 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -262,6 +262,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token UDF_RETURNS_SYM
%token UDF_SONAME_SYM
%token UDF_SYM
+%token UNION_SYM
%token UNIQUE_SYM
%token USAGE
%token USE_SYM
@@ -712,6 +713,18 @@ create_table_option:
| RAID_TYPE EQ raid_types { Lex->create_info.raid_type= $3; Lex->create_info.used_fields|= HA_CREATE_USED_RAID;}
| RAID_CHUNKS EQ ULONG_NUM { Lex->create_info.raid_chunks= $3; Lex->create_info.used_fields|= HA_CREATE_USED_RAID;}
| RAID_CHUNKSIZE EQ ULONG_NUM { Lex->create_info.raid_chunksize= $3*RAID_BLOCK_SIZE; Lex->create_info.used_fields|= HA_CREATE_USED_RAID;}
+ | UNION_SYM EQ '(' table_list ')'
+ {
+ /* Move the union list to the merge_list */
+ LEX *lex=Lex;
+ TABLE_LIST *table_list= (TABLE_LIST*) lex->table_list.first;
+ lex->create_info.merge_list= lex->table_list;
+ lex->create_info.merge_list.elements--;
+ lex->create_info.merge_list.first= (byte*) (table_list->next);
+ lex->table_list.elements=1;
+ lex->table_list.next= (byte**) &(table_list->next);
+ table_list->next=0;
+ }
table_types:
ISAM_SYM { $$= DB_TYPE_ISAM; }