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
3dd3463f
Commit
3dd3463f
authored
Jun 22, 2002
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_yacc.yy, mysql_priv.h, lex.h:
Add syntax SET NO_FOREIGN_KEY_CHECKS=1 and SET RELAXED_UNIQUE_CHECKS=1
parent
7a2b5b75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
sql/lex.h
sql/lex.h
+4
-2
sql/mysql_priv.h
sql/mysql_priv.h
+7
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+18
-0
No files found.
sql/lex.h
View file @
3dd3463f
...
...
@@ -30,9 +30,9 @@
#endif
/*
** Symbols are br
eaked in
to separated arrays to allow fieldnames with
** Symbols are br
oken in
to separated arrays to allow fieldnames with
** same name as functions
** The
e
se are kept sorted for human lookup (the symbols are hashed)
** These are kept sorted for human lookup (the symbols are hashed)
*/
static
SYMBOL
symbols
[]
=
{
...
...
@@ -232,6 +232,7 @@ static SYMBOL symbols[] = {
{
"NCHAR"
,
SYM
(
NCHAR_SYM
),
0
,
0
},
{
"NUMERIC"
,
SYM
(
NUMERIC_SYM
),
0
,
0
},
{
"NO"
,
SYM
(
NO_SYM
),
0
,
0
},
{
"NO_FOREIGN_KEY_CHECKS"
,
SYM
(
NO_FOREIGN_KEY_CHECKS
),
0
,
0
},
{
"NOT"
,
SYM
(
NOT
),
0
,
0
},
{
"NULL"
,
SYM
(
NULL_SYM
),
0
,
0
},
{
"ON"
,
SYM
(
ON
),
0
,
0
},
...
...
@@ -260,6 +261,7 @@ static SYMBOL symbols[] = {
{
"REFERENCES"
,
SYM
(
REFERENCES
),
0
,
0
},
{
"RELOAD"
,
SYM
(
RELOAD
),
0
,
0
},
{
"REGEXP"
,
SYM
(
REGEXP
),
0
,
0
},
{
"RELAXED_UNIQUE_CHECKS"
,
SYM
(
RELAXED_UNIQUE_CHECKS
),
0
,
0
},
{
"RENAME"
,
SYM
(
RENAME
),
0
,
0
},
{
"REPAIR"
,
SYM
(
REPAIR
),
0
,
0
},
{
"REPLACE"
,
SYM
(
REPLACE
),
0
,
0
},
...
...
sql/mysql_priv.h
View file @
3dd3463f
...
...
@@ -183,6 +183,13 @@ void kill_one_thread(THD *thd, ulong id);
/* The following is set when parsing the query */
#define QUERY_NO_INDEX_USED OPTION_STATUS_NO_TRANS_UPDATE*2
#define QUERY_NO_GOOD_INDEX_USED QUERY_NO_INDEX_USED*2
/* The following can be set when importing tables in a 'wrong order'
to suppress foreign key checks */
#define OPTION_NO_FOREIGN_KEY_CHECKS QUERY_NO_GOOD_INDEX_USED*2
/* The following speeds up inserts to InnoDB tables by suppressing unique
key checks in some cases */
#define OPTION_RELAXED_UNIQUE_CHECKS OPTION_NO_FOREIGN_KEY_CHECKS*2
/* NOTE: we have now used 31 bits of the OPTION flag! */
/* Bits for different SQL modes modes (including ANSI mode) */
#define MODE_REAL_AS_FLOAT 1
...
...
sql/sql_yacc.yy
View file @
3dd3463f
...
...
@@ -224,6 +224,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token NATURAL
%token NCHAR_SYM
%token NOT
%token NO_FOREIGN_KEY_CHECKS
%token NO_SYM
%token NULL_SYM
%token NUM
...
...
@@ -252,6 +253,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token REAL_NUM
%token REFERENCES
%token REGEXP
%token RELAXED_UNIQUE_CHECKS
%token RELOAD
%token RENAME
%token REPEATABLE_SYM
...
...
@@ -2602,6 +2604,7 @@ keyword:
| MYISAM_SYM {}
| NATIONAL_SYM {}
| NCHAR_SYM {}
| NO_FOREIGN_KEY_CHECKS {}
| NO_SYM {}
| OPEN_SYM {}
| PACK_KEYS_SYM {}
...
...
@@ -2614,6 +2617,7 @@ keyword:
| RAID_CHUNKSIZE {}
| RAID_STRIPED_SYM {}
| RAID_TYPE {}
| RELAXED_UNIQUE_CHECKS {}
| RELOAD {}
| REPAIR {}
| REPEATABLE_SYM {}
...
...
@@ -2771,6 +2775,20 @@ option_value:
slave_skip_counter = $3;
pthread_mutex_unlock(&LOCK_slave);
}
| NO_FOREIGN_KEY_CHECKS equal NUM
{
if (atoi($3.str) != 0)
Lex->options|= OPTION_NO_FOREIGN_KEY_CHECKS;
else
Lex->options&= ~(OPTION_NO_FOREIGN_KEY_CHECKS);
}
| RELAXED_UNIQUE_CHECKS equal NUM
{
if (atoi($3.str) != 0)
Lex->options|= OPTION_RELAXED_UNIQUE_CHECKS;
else
Lex->options&= ~(OPTION_RELAXED_UNIQUE_CHECKS);
}
text_or_password:
TEXT_STRING { $$=$1.str;}
...
...
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