MySQL++

Check-in [a45de8b0b2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added a few "throw UseQueryError" cases within class Result, applying an anonymous patch from ticket [e6cf4b6fbb4b8].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a45de8b0b237c828dbb0f9f71c55fc2d0a403eb2d8620522d436b01dfbb17c8c
User & Date: tangent 2020-07-23 06:59:08
Context
2020-07-24
15:28
Updated the top-level README.md to reflect the change in GitHub mirror update scheduling. Leaf check-in: e367c0dde5 user: tangent tags: trunk
2020-07-23
06:59
Added a few "throw UseQueryError" cases within class Result, applying an anonymous patch from ticket [e6cf4b6fbb4b8]. check-in: a45de8b0b2 user: tangent tags: trunk
06:52
The SQL type mapping for TIMESTAMP NULL was missing the MySQL++ tf_null annotation. Closes bug [585db77afe8]. check-in: 40f302fba1 user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/result.cpp.

1
2
3
4

5

6


7
8
9
10
11
12
13
14
15
...
106
107
108
109
110
111
112
113
114



115
116
117
118
119
120
121
...
186
187
188
189
190
191
192



193
194
195
196
197
198
199
/***********************************************************************
 result.cpp - Implements the ResultBase, StoreQueryResult and
	UseQuery Result classes.


 Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and

 (c) 2004-2007 by Educational Technology Resources, Inc.  Others may


 also hold copyrights on code in this file.  See the CREDITS.txt file
 in the top directory of the distribution for details.

 This file is part of MySQL++.

 MySQL++ is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published
 by the Free Software Foundation; either version 2.1 of the License, or
 (at your option) any later version.
................................................................................
		iterator it = begin();
		while (MYSQL_ROW row = dbd->fetch_row(res)) {
			if (const unsigned long* lengths = dbd->fetch_lengths(res)) {
				*it = Row(row, this, lengths, throw_exceptions());
				++it;
			}
		}

		dbd->free_result(res);



	}
}


StoreQueryResult&
StoreQueryResult::copy(const StoreQueryResult& other)
{
................................................................................
			}
			else {
				return Row();
			}
		}
	}
	else {



		// Prior to v3, this was considered an error, but it just means
		// we've fallen off the end of a "use" query's result set.  You
		// can't predict when this will happen, but it isn't an error.
		// Just return a falsy row object so caller's loop terminates.
		return Row();
	}
}




>
|
>
|
>
>
|
|







 







<

>
>
>







 







>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
110
111
112
113
114
115
116

117
118
119
120
121
122
123
124
125
126
127
...
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/***********************************************************************
 result.cpp - Implements the ResultBase, StoreQueryResult and
	UseQuery Result classes.

 Copyright
    © 1998 by Kevin Atkinson
    © 1999-2001 by MySQL AB
    © 2004-2007 by Educational Technology Resources, Inc.
    © 2020 by Warren Young

 Others may also hold copyrights on code in this file.  See the
 CREDITS.txt file in the top directory of the distribution for details.

 This file is part of MySQL++.

 MySQL++ is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published
 by the Free Software Foundation; either version 2.1 of the License, or
 (at your option) any later version.
................................................................................
		iterator it = begin();
		while (MYSQL_ROW row = dbd->fetch_row(res)) {
			if (const unsigned long* lengths = dbd->fetch_lengths(res)) {
				*it = Row(row, this, lengths, throw_exceptions());
				++it;
			}
		}

		dbd->free_result(res);
		if (throw_exceptions() && dbd->errnum() != 0) {
			throw UseQueryError(dbd->error());
		}
	}
}


StoreQueryResult&
StoreQueryResult::copy(const StoreQueryResult& other)
{
................................................................................
			}
			else {
				return Row();
			}
		}
	}
	else {
		if (throw_exceptions() && driver_->errnum() != 0) {
			throw UseQueryError(driver_->error());
		}
		// Prior to v3, this was considered an error, but it just means
		// we've fallen off the end of a "use" query's result set.  You
		// can't predict when this will happen, but it isn't an error.
		// Just return a falsy row object so caller's loop terminates.
		return Row();
	}
}