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
ddafa2cc
Commit
ddafa2cc
authored
Mar 31, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple optimzation
Portability fixes
parent
fede76dd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
20 deletions
+27
-20
client/mysqltest.c
client/mysqltest.c
+5
-3
include/mysql.h
include/mysql.h
+6
-4
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+3
-0
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+1
-1
mysql-test/r/rpl_error_ignored_table.result
mysql-test/r/rpl_error_ignored_table.result
+0
-1
mysql-test/t/heap_btree.test
mysql-test/t/heap_btree.test
+1
-0
mysql-test/t/rpl_error_ignored_table.test
mysql-test/t/rpl_error_ignored_table.test
+1
-1
sql/sql_base.cc
sql/sql_base.cc
+6
-6
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-4
No files found.
client/mysqltest.c
View file @
ddafa2cc
...
...
@@ -1833,6 +1833,7 @@ int read_line(char* buf, int size)
return
feof
(
*
cur_file
);
}
static
char
read_query_buf
[
MAX_QUERY
];
int
read_query
(
struct
st_query
**
q_ptr
)
...
...
@@ -1840,7 +1841,7 @@ int read_query(struct st_query** q_ptr)
char
*
p
=
read_query_buf
,
*
p1
;
int
expected_errno
;
struct
st_query
*
q
;
DBUG_ENTER
(
"read_query
_buf
"
);
DBUG_ENTER
(
"read_query"
);
if
(
parser
.
current_line
<
parser
.
read_lines
)
{
...
...
@@ -1857,7 +1858,7 @@ int read_query(struct st_query** q_ptr)
memcpy
((
gptr
)
q
->
expected_errno
,
(
gptr
)
global_expected_errno
,
sizeof
(
global_expected_errno
));
q
->
expected_errors
=
global_expected_errors
;
q
->
abort_on_error
=
global_expected_err
no
[
0
]
==
0
;
q
->
abort_on_error
=
global_expected_err
ors
==
0
;
bzero
((
gptr
)
global_expected_errno
,
sizeof
(
global_expected_errno
));
global_expected_errors
=
0
;
...
...
@@ -2308,7 +2309,8 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
goto
end
;
/* Ok */
}
}
DBUG_PRINT
(
"info"
,(
"i: %d expected_errors: %d"
,
i
,
q
->
expected_errors
));
DBUG_PRINT
(
"info"
,(
"i: %d expected_errors: %d"
,
i
,
q
->
expected_errors
));
dynstr_append_mem
(
ds
,
"ERROR "
,
6
);
replace_dynstr_append_mem
(
ds
,
mysql_sqlstate
(
mysql
),
strlen
(
mysql_sqlstate
(
mysql
)));
...
...
include/mysql.h
View file @
ddafa2cc
...
...
@@ -188,9 +188,9 @@ struct st_mysql_options {
/* function pointers for local infile support */
int
(
*
local_infile_init
)(
void
**
,
const
char
*
);
int
(
*
local_infile_read
)(
void
*
,
char
*
,
uint
);
int
(
*
local_infile_read
)(
void
*
,
char
*
,
u
nsigned
int
);
void
(
*
local_infile_end
)(
void
*
);
int
(
*
local_infile_error
)(
void
*
,
char
*
,
uint
);
int
(
*
local_infile_error
)(
void
*
,
char
*
,
u
nsigned
int
);
};
enum
mysql_status
...
...
@@ -397,9 +397,11 @@ my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
void
mysql_set_local_infile_handler
(
MYSQL
*
mysql
,
int
(
*
local_infile_init
)(
void
**
,
const
char
*
),
int
(
*
local_infile_read
)(
void
*
,
char
*
,
uint
),
int
(
*
local_infile_read
)(
void
*
,
char
*
,
unsigned
int
),
void
(
*
local_infile_end
)(
void
*
),
int
(
*
local_infile_error
)(
void
*
,
char
*
,
uint
));
int
(
*
local_infile_error
)(
void
*
,
char
*
,
unsigned
int
));
void
mysql_set_local_infile_default
(
MYSQL
*
mysql
);
...
...
mysql-test/mysql-test-run.sh
View file @
ddafa2cc
...
...
@@ -22,6 +22,9 @@ case `uname` in
SCO_SV
|
UnixWare
|
OpenUNIX
)
# do nothing (Causes strange behavior)
;;
QNX
)
# do nothing (avoid error message)
;;
*
)
ulimit
-n
1024
;;
...
...
mysql-test/r/heap_btree.result
View file @
ddafa2cc
...
...
@@ -178,7 +178,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range btn btn 10 NULL 1 Using where
explain select * from t1 where btn like "h%";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range btn btn 10 NULL
4
Using where
1 SIMPLE t1 range btn btn 10 NULL
#
Using where
explain select * from t1 where btn like "a%";
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range btn btn 10 NULL 1 Using where
...
...
mysql-test/r/rpl_error_ignored_table.result
View file @
ddafa2cc
...
...
@@ -26,7 +26,6 @@ select (@id := id) - id from t3;
0
kill @id;
drop table t2,t3;
Got one of the listed errors
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int primary key)
...
...
mysql-test/t/heap_btree.test
View file @
ddafa2cc
...
...
@@ -111,6 +111,7 @@ drop table t1;
create
table
t1
(
btn
char
(
10
)
not
null
,
key
using
BTREE
(
btn
))
engine
=
heap
;
insert
into
t1
values
(
"hello"
),(
"hello"
),(
"hello"
),(
"hello"
),(
"hello"
),(
"a"
),(
"b"
),(
"c"
),(
"d"
),(
"e"
),(
"f"
),(
"g"
),(
"h"
),(
"i"
);
explain
select
*
from
t1
where
btn
like
"i%"
;
--
replace_column
9
#
explain
select
*
from
t1
where
btn
like
"h%"
;
explain
select
*
from
t1
where
btn
like
"a%"
;
explain
select
*
from
t1
where
btn
like
"b%"
;
...
...
mysql-test/t/rpl_error_ignored_table.test
View file @
ddafa2cc
...
...
@@ -45,7 +45,7 @@ select (@id := id) - id from t3;
kill
@
id
;
drop
table
t2
,
t3
;
connection
master
;
--
error
1053
,
0
;
--
error
0
,
1053
;
reap
;
connection
master1
;
show
binlog
events
from
79
;
...
...
sql/sql_base.cc
View file @
ddafa2cc
...
...
@@ -2293,14 +2293,14 @@ insert_fields(THD *thd,TABLE_LIST *tables, const char *db_name,
DBUG_RETURN
(
-
1
);
#endif
Field
**
ptr
=
table
->
field
,
*
field
;
TABLE
*
natural_join_table
;
TABLE
*
natural_join_table
=
0
;
thd
->
used_tables
|=
table
->
map
;
if
(
table
->
outer_join
||
!
tables
->
natural_join
||
tables
->
natural_join
->
table
->
outer_join
)
natural_join_table
=
NULL
;
else
if
(
!
table
->
outer_join
&&
tables
->
natural_join
&&
!
tables
->
natural_join
->
table
->
outer_join
)
natural_join_table
=
tables
->
natural_join
->
table
;
while
((
field
=
*
ptr
++
))
{
/* Skip duplicate field names if NATURAL JOIN is used */
...
...
sql/sql_yacc.yy
View file @
ddafa2cc
...
...
@@ -1798,10 +1798,10 @@ alter_list_item:
YYABORT;
}
LEX *lex= Lex;
lex->create_info.table_charset=
$5;
lex->create_info.used_fields|= HA_CREATE_USED_CHARSET;
lex->create_info.
default_table_charset= $5;
lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET
;
lex->create_info.table_charset=
lex->create_info.default_table_charset= $5;
lex->create_info.
used_fields|= (HA_CREATE_USED_CHARSET |
HA_CREATE_USED_DEFAULT_CHARSET)
;
lex->simple_alter= 0;
}
| create_table_options_space_separated { Lex->simple_alter=0; }
...
...
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