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
d7ce48a9
Commit
d7ce48a9
authored
Nov 10, 2007
by
istruewing@stella.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into stella.local:/home2/mydev/mysql-5.1-bug31210
parents
ceb444fa
3eaf82a1
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
38 additions
and
2 deletions
+38
-2
mysql-test/r/partition_hash.result
mysql-test/r/partition_hash.result
+4
-0
mysql-test/t/partition_hash.test
mysql-test/t/partition_hash.test
+8
-0
sql/event_scheduler.cc
sql/event_scheduler.cc
+1
-0
sql/events.cc
sql/events.cc
+1
-0
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+1
-0
sql/slave.cc
sql/slave.cc
+1
-0
sql/sql_acl.cc
sql/sql_acl.cc
+2
-0
sql/sql_base.cc
sql/sql_base.cc
+3
-0
sql/sql_connect.cc
sql/sql_connect.cc
+1
-0
sql/sql_insert.cc
sql/sql_insert.cc
+6
-1
sql/sql_lex.cc
sql/sql_lex.cc
+2
-1
sql/sql_lex.h
sql/sql_lex.h
+1
-0
sql/sql_plugin.cc
sql/sql_plugin.cc
+1
-0
sql/sql_servers.cc
sql/sql_servers.cc
+1
-0
sql/sql_udf.cc
sql/sql_udf.cc
+1
-0
sql/table.cc
sql/table.cc
+3
-0
sql/tztime.cc
sql/tztime.cc
+1
-0
No files found.
mysql-test/r/partition_hash.result
View file @
d7ce48a9
...
...
@@ -183,3 +183,7 @@ c1 c2 c3
182 abc 2002-11-09
184 abc 2002-11-22
drop table t1;
CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1;
INSERT DELAYED INTO t1 VALUES (1);
ERROR HY000: Table storage engine for 't1' doesn't have this option
DROP TABLE t1;
mysql-test/t/partition_hash.test
View file @
d7ce48a9
...
...
@@ -144,3 +144,11 @@ select * from t1 where c3 between '2002-01-01' and '2002-12-31';
drop
table
t1
;
#
# Bug#31210 - INSERT DELAYED crashes server when used on partitioned table
#
CREATE
TABLE
t1
(
c1
INT
)
ENGINE
=
MyISAM
PARTITION
BY
HASH
(
c1
)
PARTITIONS
1
;
--
error
ER_ILLEGAL_HA
INSERT
DELAYED
INTO
t1
VALUES
(
1
);
DROP
TABLE
t1
;
sql/event_scheduler.cc
View file @
d7ce48a9
...
...
@@ -127,6 +127,7 @@ post_init_event_thread(THD *thd)
thd
->
cleanup
();
return
TRUE
;
}
lex_start
(
thd
);
pthread_mutex_lock
(
&
LOCK_thread_count
);
threads
.
append
(
thd
);
...
...
sql/events.cc
View file @
d7ce48a9
...
...
@@ -884,6 +884,7 @@ Events::init(my_bool opt_noacl)
*/
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
lex_start
(
thd
);
/*
We will need Event_db_repository anyway, even if the scheduler is
...
...
sql/ha_ndbcluster_binlog.cc
View file @
d7ce48a9
...
...
@@ -3621,6 +3621,7 @@ pthread_handler_t ndb_binlog_thread_func(void *arg)
pthread_exit
(
0
);
DBUG_RETURN
(
NULL
);
}
lex_start
(
thd
);
thd
->
init_for_queries
();
thd
->
command
=
COM_DAEMON
;
...
...
sql/slave.cc
View file @
d7ce48a9
...
...
@@ -1510,6 +1510,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
delete
thd
;
DBUG_RETURN
(
-
1
);
}
lex_start
(
thd
);
if
(
thd_type
==
SLAVE_THD_SQL
)
thd
->
proc_info
=
"Waiting for the next event in relay log"
;
...
...
sql/sql_acl.cc
View file @
d7ce48a9
...
...
@@ -277,6 +277,7 @@ my_bool acl_init(bool dont_read_acl_tables)
DBUG_RETURN
(
1
);
/* purecov: inspected */
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
lex_start
(
thd
);
/*
It is safe to call acl_reload() since acl_* arrays and hashes which
will be freed there are global static objects and thus are initialized
...
...
@@ -3493,6 +3494,7 @@ my_bool grant_init()
DBUG_RETURN
(
1
);
/* purecov: deadcode */
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
lex_start
(
thd
);
return_val
=
grant_reload
(
thd
);
delete
thd
;
/* Remember that we don't have a THD */
...
...
sql/sql_base.cc
View file @
d7ce48a9
...
...
@@ -2248,6 +2248,9 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
HASH_SEARCH_STATE
state
;
DBUG_ENTER
(
"open_table"
);
/* Parsing of partitioning information from .frm needs thd->lex set up. */
DBUG_ASSERT
(
thd
->
lex
->
is_lex_started
);
/* find a unused table in the open table cache */
if
(
refresh
)
*
refresh
=
0
;
...
...
sql/sql_connect.cc
View file @
d7ce48a9
...
...
@@ -1095,6 +1095,7 @@ pthread_handler_t handle_one_connection(void *arg)
{
NET
*
net
=
&
thd
->
net
;
lex_start
(
thd
);
if
(
login_connection
(
thd
))
goto
end_thread
;
...
...
sql/sql_insert.cc
View file @
d7ce48a9
...
...
@@ -2267,7 +2267,12 @@ pthread_handler_t handle_delayed_insert(void *arg)
goto
err
;
}
/* open table */
/*
Open table requires an initialized lex in case the table is
partitioned. The .frm file contains a partial SQL string which is
parsed using a lex, that depends on initialized thd->lex.
*/
lex_start
(
thd
);
if
(
!
(
di
->
table
=
open_ltable
(
thd
,
&
di
->
table_list
,
TL_WRITE_DELAYED
,
0
)))
{
thd
->
fatal_error
();
// Abort waiting inserts
...
...
sql/sql_lex.cc
View file @
d7ce48a9
...
...
@@ -363,6 +363,7 @@ void lex_start(THD *thd)
lex
->
server_options
.
owner
=
0
;
lex
->
server_options
.
port
=
-
1
;
lex
->
is_lex_started
=
TRUE
;
DBUG_VOID_RETURN
;
}
...
...
@@ -2139,7 +2140,7 @@ void Query_tables_list::destroy_query_tables_list()
st_lex
::
st_lex
()
:
result
(
0
),
yacc_yyss
(
0
),
yacc_yyvs
(
0
),
sql_command
(
SQLCOM_END
),
option_type
(
OPT_DEFAULT
)
sql_command
(
SQLCOM_END
),
option_type
(
OPT_DEFAULT
)
,
is_lex_started
(
0
)
{
my_init_dynamic_array2
(
&
plugins
,
sizeof
(
plugin_ref
),
...
...
sql/sql_lex.h
View file @
d7ce48a9
...
...
@@ -1712,6 +1712,7 @@ typedef struct st_lex : public Query_tables_list
st_alter_tablespace
*
alter_tablespace_info
;
bool
escape_used
;
bool
is_lex_started
;
/* If lex_start() did run. For debugging. */
st_lex
();
...
...
sql/sql_plugin.cc
View file @
d7ce48a9
...
...
@@ -1329,6 +1329,7 @@ static void plugin_load(MEM_ROOT *tmp_root, int *argc, char **argv)
}
new_thd
->
thread_stack
=
(
char
*
)
&
tables
;
new_thd
->
store_globals
();
lex_start
(
new_thd
);
new_thd
->
db
=
my_strdup
(
"mysql"
,
MYF
(
0
));
new_thd
->
db_length
=
5
;
bzero
((
uchar
*
)
&
tables
,
sizeof
(
tables
));
...
...
sql/sql_servers.cc
View file @
d7ce48a9
...
...
@@ -140,6 +140,7 @@ bool servers_init(bool dont_read_servers_table)
DBUG_RETURN
(
TRUE
);
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
lex_start
(
thd
);
/*
It is safe to call servers_reload() since servers_* arrays and hashes which
will be freed there are global static objects and thus are initialized
...
...
sql/sql_udf.cc
View file @
d7ce48a9
...
...
@@ -135,6 +135,7 @@ void udf_init()
initialized
=
1
;
new_thd
->
thread_stack
=
(
char
*
)
&
new_thd
;
new_thd
->
store_globals
();
lex_start
(
new_thd
);
new_thd
->
set_db
(
db
,
sizeof
(
db
)
-
1
);
bzero
((
uchar
*
)
&
tables
,
sizeof
(
tables
));
...
...
sql/table.cc
View file @
d7ce48a9
...
...
@@ -1610,6 +1610,9 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
DBUG_PRINT
(
"enter"
,(
"name: '%s.%s' form: 0x%lx"
,
share
->
db
.
str
,
share
->
table_name
.
str
,
(
long
)
outparam
));
/* Parsing of partitioning information from .frm needs thd->lex set up. */
DBUG_ASSERT
(
thd
->
lex
->
is_lex_started
);
error
=
1
;
bzero
((
char
*
)
outparam
,
sizeof
(
*
outparam
));
outparam
->
in_use
=
thd
;
...
...
sql/tztime.cc
View file @
d7ce48a9
...
...
@@ -1575,6 +1575,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
DBUG_RETURN
(
1
);
thd
->
thread_stack
=
(
char
*
)
&
thd
;
thd
->
store_globals
();
lex_start
(
thd
);
/* Init all memory structures that require explicit destruction */
if
(
hash_init
(
&
tz_names
,
&
my_charset_latin1
,
20
,
...
...
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