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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
802c09ad
Commit
802c09ad
authored
Apr 12, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: Merge revisions 459:465 from trunk.
parent
0c4dfda3
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
91 additions
and
35 deletions
+91
-35
dict/dict0crea.c
dict/dict0crea.c
+3
-19
dict/dict0dict.c
dict/dict0dict.c
+0
-4
dict/dict0load.c
dict/dict0load.c
+9
-7
dict/dict0mem.c
dict/dict0mem.c
+0
-1
include/dict0dict.h
include/dict0dict.h
+0
-2
include/dict0mem.h
include/dict0mem.h
+0
-1
include/pars0pars.h
include/pars0pars.h
+16
-0
include/que0que.h
include/que0que.h
+8
-1
pars/pars0pars.c
pars/pars0pars.c
+24
-0
que/que0que.c
que/que0que.c
+31
-0
No files found.
dict/dict0crea.c
View file @
802c09ad
...
...
@@ -75,7 +75,7 @@ dict_create_sys_tables_tuple(
dfield
=
dtuple_get_nth_field
(
entry
,
3
);
ptr
=
mem_heap_alloc
(
heap
,
4
);
mach_write_to_4
(
ptr
,
table
->
type
);
mach_write_to_4
(
ptr
,
DICT_TABLE_ORDINARY
);
dfield_set_data
(
dfield
,
ptr
,
4
);
/* 6: MIX_ID ---------------------------*/
...
...
@@ -1256,7 +1256,7 @@ dict_create_or_check_foreign_constraint_tables(void)
}
/********************************************************************
Evaluate the given SQL statement. */
Evaluate the given
foreign key
SQL statement. */
ulint
dict_foreign_eval_sql
(
...
...
@@ -1268,26 +1268,10 @@ dict_foreign_eval_sql(
dict_foreign_t
*
foreign
,
/* in: foreign */
trx_t
*
trx
)
/* in: transaction */
{
que_thr_t
*
thr
;
que_t
*
graph
;
ulint
error
;
FILE
*
ef
=
dict_foreign_err_file
;
graph
=
pars_sql
(
info
,
sql
);
ut_a
(
graph
);
graph
->
trx
=
trx
;
trx
->
graph
=
NULL
;
graph
->
fork_type
=
QUE_FORK_MYSQL_INTERFACE
;
ut_a
(
thr
=
que_fork_start_command
(
graph
));
que_run_threads
(
thr
);
error
=
trx
->
error_state
;
que_graph_free
(
graph
);
error
=
que_eval_sql
(
info
,
sql
,
trx
);
if
(
error
==
DB_DUPLICATE_KEY
)
{
mutex_enter
(
&
dict_foreign_err_mutex
);
...
...
dict/dict0dict.c
View file @
802c09ad
...
...
@@ -1716,8 +1716,6 @@ dict_table_copy_types(
dtype_t
*
type
;
ulint
i
;
ut_ad
(
!
(
table
->
type
&
DICT_UNIVERSAL
));
for
(
i
=
0
;
i
<
dtuple_get_n_fields
(
tuple
);
i
++
)
{
dfield_type
=
dfield_get_type
(
dtuple_get_nth_field
(
tuple
,
i
));
...
...
@@ -1766,8 +1764,6 @@ dict_index_build_internal_clust(
new_index
->
id
=
index
->
id
;
ut_a
(
table
->
type
==
DICT_TABLE_ORDINARY
);
/* Copy the fields of index */
dict_index_copy
(
new_index
,
index
,
0
,
index
->
n_fields
);
...
...
dict/dict0load.c
View file @
802c09ad
...
...
@@ -768,7 +768,7 @@ dict_load_table(
if
(
!
btr_pcur_is_on_user_rec
(
&
pcur
,
&
mtr
)
||
rec_get_deleted_flag
(
rec
,
0
))
{
/* Not found */
err_exit:
btr_pcur_close
(
&
pcur
);
mtr_commit
(
&
mtr
);
mem_heap_free
(
heap
);
...
...
@@ -780,11 +780,8 @@ dict_load_table(
/* Check if the table name in record is the searched one */
if
(
len
!=
ut_strlen
(
name
)
||
ut_memcmp
(
name
,
field
,
len
)
!=
0
)
{
btr_pcur_close
(
&
pcur
);
mtr_commit
(
&
mtr
);
mem_heap_free
(
heap
);
return
(
NULL
)
;
goto
err_exit
;
}
ut_a
(
0
==
ut_strcmp
(
"SPACE"
,
...
...
@@ -848,8 +845,13 @@ dict_load_table(
table
->
id
=
mach_read_from_8
(
field
);
field
=
rec_get_nth_field_old
(
rec
,
5
,
&
len
);
table
->
type
=
mach_read_from_4
(
field
);
ut_a
(
table
->
type
==
DICT_TABLE_ORDINARY
);
if
(
UNIV_UNLIKELY
(
mach_read_from_4
(
field
)
!=
DICT_TABLE_ORDINARY
))
{
ut_print_timestamp
(
stderr
);
fprintf
(
stderr
,
" InnoDB: table %s: unknown table type %lu
\n
"
,
name
,
(
ulong
)
mach_read_from_4
(
field
));
goto
err_exit
;
}
btr_pcur_close
(
&
pcur
);
mtr_commit
(
&
mtr
);
...
...
dict/dict0mem.c
View file @
802c09ad
...
...
@@ -50,7 +50,6 @@ dict_mem_table_create(
table
->
heap
=
heap
;
table
->
type
=
DICT_TABLE_ORDINARY
;
table
->
flags
=
flags
;
table
->
name
=
mem_heap_strdup
(
heap
,
name
);
table
->
dir_path_of_temp_table
=
NULL
;
...
...
include/dict0dict.h
View file @
802c09ad
...
...
@@ -946,7 +946,6 @@ dict_tables_have_same_db(
dbname '/' tablename */
const
char
*
name2
);
/* in: table name in the form
dbname '/' tablename */
/*************************************************************************
Scans from pointer onwards. Stops if is at the start of a copy of
'string' where characters are compared without case sensitivity. Stops
...
...
@@ -958,7 +957,6 @@ dict_scan_to(
/* out: scanned up to this */
const
char
*
ptr
,
/* in: scan from */
const
char
*
string
);
/* in: look for this */
/* Buffers for storing detailed information about the latest foreign key
and unique key errors */
extern
FILE
*
dict_foreign_err_file
;
...
...
include/dict0mem.h
View file @
802c09ad
...
...
@@ -282,7 +282,6 @@ a foreign key constraint is enforced, therefore RESTRICT just means no flag */
/* Data structure for a database table */
struct
dict_table_struct
{
dulint
id
;
/* id of the table */
ulint
type
;
/* DICT_TABLE_ORDINARY, ... */
ulint
flags
;
/* DICT_TF_COMPACT, ... */
mem_heap_t
*
heap
;
/* memory heap */
const
char
*
name
;
/* table name */
...
...
include/pars0pars.h
View file @
802c09ad
...
...
@@ -505,6 +505,22 @@ pars_info_add_int4_literal(
lint
val
);
/* in: value */
/********************************************************************
Equivalent to:
char buf[8];
mach_write_to_8(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_BINARY, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
void
pars_info_add_dulint_literal
(
/*=========================*/
pars_info_t
*
info
,
/* in: info struct */
const
char
*
name
,
/* in: name */
dulint
val
);
/* in: value */
/********************************************************************
Add user function. */
void
...
...
include/que0que.h
View file @
802c09ad
...
...
@@ -331,8 +331,15 @@ void
que_node_print_info
(
/*================*/
que_node_t
*
node
);
/* in: query graph node */
/*************************************************************************
Evaluate the given SQL */
ulint
que_eval_sql
(
/*=========*/
pars_info_t
*
info
,
/* out: error code or DB_SUCCESS */
const
char
*
sql
,
/* in: info struct, or NULL */
trx_t
*
trx
);
/* in: trx */
/* Query graph query thread node: the fields are protected by the kernel
mutex with the exceptions named below */
...
...
pars/pars0pars.c
View file @
802c09ad
...
...
@@ -2016,6 +2016,30 @@ pars_info_add_int4_literal(
pars_info_add_literal
(
info
,
name
,
buf
,
4
,
DATA_INT
,
0
);
}
/********************************************************************
Equivalent to:
char buf[8];
mach_write_to_8(buf, val);
pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0);
except that the buffer is dynamically allocated from the info struct's
heap. */
void
pars_info_add_dulint_literal
(
/*=========================*/
pars_info_t
*
info
,
/* in: info struct */
const
char
*
name
,
/* in: name */
dulint
val
)
/* in: value */
{
byte
*
buf
=
mem_heap_alloc
(
info
->
heap
,
8
);
mach_write_to_8
(
buf
,
val
);
pars_info_add_literal
(
info
,
name
,
buf
,
8
,
DATA_FIXBINARY
,
0
);
}
/********************************************************************
Add user function. */
...
...
que/que0que.c
View file @
802c09ad
...
...
@@ -25,6 +25,7 @@ Created 5/27/1996 Heikki Tuuri
#include "log0log.h"
#include "eval0proc.h"
#include "eval0eval.h"
#include "pars0types.h"
#define QUE_PARALLELIZE_LIMIT (64 * 256 * 256 * 256)
#define QUE_ROUND_ROBIN_LIMIT (64 * 256 * 256 * 256)
...
...
@@ -1365,3 +1366,33 @@ que_run_threads(
goto
loop
;
}
/*************************************************************************
Evaluate the given SQL */
ulint
que_eval_sql
(
/*=========*/
pars_info_t
*
info
,
/* out: error code or DB_SUCCESS */
const
char
*
sql
,
/* in: info struct, or NULL */
trx_t
*
trx
)
/* in: trx */
{
que_thr_t
*
thr
;
que_t
*
graph
;
graph
=
pars_sql
(
info
,
sql
);
ut_a
(
graph
);
graph
->
trx
=
trx
;
trx
->
graph
=
NULL
;
graph
->
fork_type
=
QUE_FORK_MYSQL_INTERFACE
;
ut_a
(
thr
=
que_fork_start_command
(
graph
));
que_run_threads
(
thr
);
que_graph_free
(
graph
);
return
(
trx
->
error_state
);
}
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